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

Method testGetExit

src/test/java/mudmap2/backend/PlaceTest.java:404–419  ·  view source on GitHub ↗

Test of getExit method, of class Place.

()

Source from the content-addressed store, hash-verified

402 * Test of getExit method, of class Place.
403 */
404 @Test
405 public void testGetExit() {
406 System.out.println("getExit");
407
408 Place instance = new Place("MyPlace", 0, 0, layer);
409 Place p2 = new Place("Other Place", 1, 0, layer);
410
411 assertTrue(instance.getExit("n").isEmpty());
412
413 String dir1 = "n";
414 String dir2 = "s";
415 Path p = new Path(p2, dir1, instance, dir2);
416 instance.connectPath(p);
417 HashSet<Path> result = instance.getExit(dir2);
418 assertTrue(result.contains(p));
419 }
420
421 /**
422 * Test of getPaths method, of class Place.

Callers

nothing calls this directly

Calls 4

getExitMethod · 0.95
connectPathMethod · 0.95
isEmptyMethod · 0.65
containsMethod · 0.65

Tested by

no test coverage detected