public void SimpleGraphCycleTest1() { GraphBuilder gb = GraphTestUtilities.PopulateGB("simplecycle1"); Assert.IsTrue(gb.Graph.IsCyclic); Assert.AreEqual(2, gb.Graph.Nodes.Length); }
public void SimpleGraphCycleTest3() { GraphBuilder gb = GraphTestUtilities.PopulateGB("simplecycle3"); Assert.IsTrue(gb.Graph.IsCyclic); Assert.AreEqual(1, gb.Graph.Paths("B").Count); Assert.IsTrue(gb.Graph.Paths("B").Contains("C")); }
public void SimpleGraphBuilderTest2() { GraphBuilder gb = GraphTestUtilities.PopulateGB("simple2"); Assert.AreEqual(2, gb.Graph.NodeCount); Assert.AreEqual(1, gb.Graph.Paths("A").Count); Assert.AreEqual(0, gb.Graph.Paths("B").Count); Assert.AreEqual(1, gb.Graph.Children("B").Count); }
public void SimpleGraphBuilderTest3() { GraphBuilder gb = GraphTestUtilities.PopulateGB("simple3"); Assert.AreEqual(3, gb.Graph.NodeCount); Assert.AreEqual(2, gb.Graph.Paths("A").Count); Assert.AreEqual(0, gb.Graph.Paths("B").Count); Assert.AreEqual(0, gb.Graph.Paths("C").Count); Assert.IsTrue(gb.Graph.Paths("A").Contains("B")); Assert.IsTrue(gb.Graph.Paths("A").Contains("C")); Assert.AreEqual(1, gb.Graph.Children("B").Count); Assert.AreEqual(1, gb.Graph.Children("C").Count); }
public void IntermediateGraphCycleTest1() { GraphBuilder gb = GraphTestUtilities.PopulateGB("intermediatecycle1"); Assert.IsFalse(gb.Graph.IsCyclic); Assert.AreEqual(2, gb.Graph.Children("A").Count); Assert.IsTrue(gb.Graph.Children("A").Contains("B")); Assert.IsTrue(gb.Graph.Children("A").Contains("C")); Assert.AreEqual(0, gb.Graph.Children("B").Count); Assert.AreEqual(2, gb.Graph.Children("C").Count); Assert.IsTrue(gb.Graph.Children("C").Contains("D")); Assert.IsTrue(gb.Graph.Children("C").Contains("E")); Assert.AreEqual(1, gb.Graph.Children("D").Count); Assert.IsTrue(gb.Graph.Children("D").Contains("E")); Assert.AreEqual(0, gb.Graph.Children("E").Count); Assert.AreEqual(5, gb.Graph.Nodes.Length); }
public void SimpleGraphCycleTest4() { GraphBuilder gb = GraphTestUtilities.PopulateGB("simplecycle4"); Assert.IsTrue(gb.Graph.IsCyclic); }
public void FailGraphBuilderTest1() { // tests the top level package field is malformed GraphBuilder gb = GraphTestUtilities.PopulateGB("failure1"); }