public void OneVerticeGraphHasNoBridges() { var sut = new BridgesInGraph(); var graph = new UndirectedGraph(1); Assert.Empty(sut.GetBridges(graph)); }
public void TwoVerticeGraphHasOneBridges() { var sut = new BridgesInGraph(); var graph = new UndirectedGraph(2); graph.Connect(0, 1); Assert.Collection(sut.GetBridges(graph), arg => Assert.Equal(new Tuple <int, int>(0, 1), arg)); }
public void ThreeVerticeGraphHasNoBridges() { var sut = new BridgesInGraph(); var graph = new UndirectedGraph(3); graph.Connect(0, 1); graph.Connect(1, 2); graph.Connect(2, 0); Assert.Empty(sut.GetBridges(graph)); }