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

Method testIsEmpty

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

Test of isEmpty method, of class Layer.

()

Source from the content-addressed store, hash-verified

760 * Test of isEmpty method, of class Layer.
761 */
762 @Test
763 public void testIsEmpty() {
764 System.out.println("isEmpty");
765
766 Layer instance = new Layer(world);
767 // empty layer
768 assertTrue(instance.isEmpty());
769
770 try {
771 Place element = new Place("MyPlace", 0, 0, instance);
772 instance.put(element);
773 // layer has one place
774 assertFalse(instance.isEmpty());
775
776 instance.remove(element);
777 // empty layer
778 assertTrue(instance.isEmpty());
779 } catch (RuntimeException | Layer.PlaceNotInsertedException ex) {
780 fail(ex.getMessage());
781 }
782
783 }
784
785 /**
786 * Test of getPlaces method, of class Layer.

Callers

nothing calls this directly

Calls 3

isEmptyMethod · 0.95
putMethod · 0.95
removeMethod · 0.95

Tested by

no test coverage detected