Test of getPaths method, of class Place.
()
| 422 | * Test of getPaths method, of class Place. |
| 423 | */ |
| 424 | @Test |
| 425 | public void testGetPaths_Place() { |
| 426 | System.out.println("getPaths"); |
| 427 | |
| 428 | Place instance = new Place("MyPlace", 1, 1, layer); |
| 429 | Place place1 = new Place("Another place", 1, 2, layer); |
| 430 | |
| 431 | HashSet<Path> result1 = instance.getPaths(place1); |
| 432 | assertNotNull(result1); |
| 433 | assertTrue(result1.isEmpty()); |
| 434 | |
| 435 | Path p1 = new Path(instance, "n", place1, "s"); |
| 436 | Path p2 = new Path(place1, "n", instance, "s"); |
| 437 | instance.connectPath(p1); |
| 438 | instance.connectPath(p2); |
| 439 | |
| 440 | HashSet<Path> result2 = instance.getPaths(place1); |
| 441 | assertEquals(2, result2.size()); |
| 442 | assertTrue(result2.contains(p1)); |
| 443 | assertTrue(result2.contains(p2)); |
| 444 | |
| 445 | HashSet<Path> result3 = instance.getPaths(null); |
| 446 | assertNotNull(result3); |
| 447 | assertTrue(result3.isEmpty()); |
| 448 | } |
| 449 | |
| 450 | /** |
| 451 | * Test of getPaths method, of class Place. |
nothing calls this directly
no test coverage detected