MCPcopy Create free account
hub / github.com/Neop/mudmap2 / testRemove

Method testRemove

src/test/java/mudmap2/backend/LayerTest.java:675–692  ·  view source on GitHub ↗

Test of removePlace method, of class Layer.

()

Source from the content-addressed store, hash-verified

673 * Test of removePlace method, of class Layer.
674 */
675 @Test
676 public void testRemove() {
677 System.out.println("remove");
678
679 Layer instance = new Layer(world);
680
681 try {
682 Place element = new Place("MyPlace", 0, 0, instance);
683 instance.put(element);
684 assertEquals(element, instance.get(0, 0));
685 assertTrue(instance.exist(0, 0));
686
687 instance.remove(element);
688 assertFalse(instance.exist(0, 0));
689 } catch (RuntimeException | Layer.PlaceNotInsertedException ex) {
690 fail(ex.getMessage());
691 }
692 }
693
694 /**
695 * Test of exist method, of class Layer.

Callers

nothing calls this directly

Calls 4

putMethod · 0.95
getMethod · 0.95
existMethod · 0.95
removeMethod · 0.95

Tested by

no test coverage detected