public void GenerateGraphGeneratesTriangleGraphStructure1_BackSequencesTest() { var target = GraphGenerator.GenerateGraph(3, 2, 4); GraphTestHelper.AssertConsistsOfBackSequences(target, new[] { new[] { 8, 0 }, new[] { 8, 1 }, new[] { 8, 2 }, new[] { 8, 3 }, new[] { 9, 0 }, new[] { 9, 1 }, new[] { 9, 2 }, new[] { 9, 3 }, new[] { 10, 4 }, new[] { 10, 5 }, new[] { 10, 6 }, new[] { 10, 7 }, new[] { 11, 4 }, new[] { 11, 5 }, new[] { 11, 6 }, new[] { 11, 7 }, new[] { 12, 8 }, new[] { 12, 9 }, new[] { 12, 10 }, new[] { 12, 11 }, new[] { 13, 8 }, new[] { 13, 9 }, new[] { 13, 10 }, new[] { 13, 11 }, }); }
public void AddAddsSequence() { var target = GraphTestHelper.CreateEmptyGraph(TargetGraph); target.AddSequence(new [] { 0, 1 }); target.AddSequence(new [] { 1, 2 }); target.AddSequence(new [] { 2, 3 }); target.AddSequence(new [] { 3, 4 }); target.AddSequence(new [] { 4, 5 }); target.AddSequence(new [] { 5, 6 }); target.AddSequence(new [] { 6, 7 }); target.AddSequence(new [] { 7, 8 }); target.AddSequence(new [] { 8, 9 }); Assert.AreEqual(10, target.CountNodes); GraphTestHelper.AssertConsistsOfSequences(target, new[] { new[] { 0, 1 }, new[] { 1, 2 }, new[] { 2, 3 }, new[] { 3, 4 }, new[] { 4, 5 }, new[] { 5, 6 }, new[] { 6, 7 }, new[] { 7, 8 }, new[] { 8, 9 }, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, }); GraphTestHelper.AssertConsistsOfBackSequences(target, new[] { new[] { 1, 0 }, new[] { 2, 1 }, new[] { 3, 2 }, new[] { 4, 3 }, new[] { 5, 4 }, new[] { 6, 5 }, new[] { 7, 6 }, new[] { 8, 7 }, new[] { 9, 8 }, new[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, }); }