" ",
" ",
" ",
};
Graph graph = Graph.fromStringArray(array);
Assert.assertEquals(2, new BFS(graph).distanceFrom(new Node(0, 0), new Node(2, 2)));
Assert.assertEquals(2, new BFS(graph).distanceFrom(new Node(0, 0), new Node(0, 2)));
array = new String[]{
" ",
"#",
" "};
graph = Graph.fromStringArray(array);
Assert.assertEquals(10 /*graph size = 3; so 3 * 3 + 1*/,
new BFS(graph).distanceFrom(new Node(0, 0), new Node(2, 0)));
}