public void CompareGraphs() { RouteGraph one = new RouteGraph(finishedSampleInputGraph, null); RouteGraph two = new RouteGraph(finishedLargerInputGraph, null); RouteGraph three = new RouteGraph(finishedShuffledGraph, null); Assert.IsTrue(one.Equals(one)); Assert.IsTrue(two.Equals(two)); Assert.IsTrue(three.Equals(three)); Assert.IsFalse(one.Equals(two)); Assert.IsFalse(one.Equals(three)); Assert.IsFalse(two.Equals(three)); }
public void MapPathTest() { RouteGraph routeGraph = new RouteGraph(midProcessGraph, midProcessIdentifiers); RouteGraph testGraph = new RouteGraph(finishedMidProcessGraph, null); routeGraph.MapPath("/about-us.html -> /about"); routeGraph.Equals(testGraph); }
/// <summary> /// Used for running tests on the process function /// </summary> /// <param name="input">input to be processed</param> /// <param name="output">graph to be validated</param> private void TestProcessWith(List <string> input, List <List <int> > output) { RouteGraph routeGraph = new RouteGraph(); RouteGraph testGraph = new RouteGraph(output, null); try { routeGraph.Process(input); } catch (Exception exc) { Assert.Fail(exc.Message); } Assert.IsTrue(routeGraph.Equals(testGraph)); }