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

Method testGetPaths_0args

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

Test of getPaths method, of class Place.

()

Source from the content-addressed store, hash-verified

451 * Test of getPaths method, of class Place.
452 */
453 @Test
454 public void testGetPaths_0args() {
455 System.out.println("getPaths");
456
457 Place instance = new Place("MyPlace", 1, 1, layer);
458 Place place = new Place("Another place", 1, 2, layer);
459
460 HashSet<Path> result = instance.getPaths();
461 assertNotNull(result);
462 assertTrue(result.isEmpty());
463
464 Path p1 = new Path(instance, "n", place, "s");
465 Path p2 = new Path(place, "n", instance, "s");
466 instance.connectPath(p1);
467 instance.connectPath(p2);
468
469 result = instance.getPaths();
470 assertEquals(2, result.size());
471 assertTrue(result.contains(p1));
472 assertTrue(result.contains(p2));
473 }
474
475 /**
476 * Test of removePath method, of class Place.

Callers

nothing calls this directly

Calls 4

getPathsMethod · 0.95
connectPathMethod · 0.95
isEmptyMethod · 0.65
containsMethod · 0.65

Tested by

no test coverage detected