public void IputNULLTestNotException() { PathConstructorNoException pathConstructorNoException = new PathConstructorNoException(); var result = pathConstructorNoException.ConstructPath(null); Assert.AreEqual(null, result); }
public void OneElementListMyOwnComparatorNoException() { List <Tuple <string, string> > list = new List <Tuple <string, string> >(); list.Add(new Tuple <string, string>("two", "three")); PathConstructorNoException PathConstructorNoException = new PathConstructorNoException(); var result = PathConstructorNoException.ConstructPath(list); Assert.AreEqual(true, Comparator(result, list), "My own Comparator"); }
static void Test(List <Tuple <string, string> > list) { List <Tuple <string, string> > new_list = new List <Tuple <string, string> >(); printPath(list); PathConstructorNoException pathConstructorNoException = new PathConstructorNoException(); new_list = pathConstructorNoException.ConstructPath(list); printPath(new_list); Console.WriteLine("--------------------------------------"); }
public void EmptyElementInListNoException() { List <Tuple <string, string> > list = new List <Tuple <string, string> >(); list.Add(new Tuple <string, string>("two", "three")); list.Add(new Tuple <string, string>("three", "four")); list.Add(new Tuple <string, string>("four", "")); PathConstructorNoException pathConstructorNoException = new PathConstructorNoException(); var result = pathConstructorNoException.ConstructPath(list); Assert.AreEqual(null, result); }
public void OneElementListNoException() { List <Tuple <string, string> > list = new List <Tuple <string, string> >(); list.Add(new Tuple <string, string>("two", "three")); PathConstructorNoException pathConstructorNoException = new PathConstructorNoException(); var result = pathConstructorNoException.ConstructPath(list); var firstNotSecond = result.Except(list).ToList(); Assert.AreEqual(firstNotSecond.Count(), 0, "using ListExcept"); }
public void BranchTwoNoException() { List <Tuple <string, string> > list = new List <Tuple <string, string> >(); list.Add(new Tuple <string, string>("one", "two")); list.Add(new Tuple <string, string>("two", "three")); list.Add(new Tuple <string, string>("three", "four")); list.Add(new Tuple <string, string>("seven", "two")); list.Add(new Tuple <string, string>("four", "five")); PathConstructorNoException pathConstructorNoException = new PathConstructorNoException(); var result = pathConstructorNoException.ConstructPath(list); Assert.AreEqual(null, result); }
public void MultiElementListMyOwnComparatorNoException() { List <Tuple <string, string> > list = new List <Tuple <string, string> >(); list.Add(new Tuple <string, string>("two", "three")); list.Add(new Tuple <string, string>("four", "five")); list.Add(new Tuple <string, string>("one", "two")); list.Add(new Tuple <string, string>("three", "four")); PathConstructorNoException PathConstructorNoException = new PathConstructorNoException(); var result = PathConstructorNoException.ConstructPath(list); List <Tuple <string, string> > correctList = new List <Tuple <string, string> >(); correctList.Add(new Tuple <string, string>("one", "two")); correctList.Add(new Tuple <string, string>("two", "three")); correctList.Add(new Tuple <string, string>("three", "four")); correctList.Add(new Tuple <string, string>("four", "five")); var firstNotSecond = result.Except(correctList).ToList(); Assert.AreEqual(true, Comparator(result, correctList), "My own Comparator"); }
public void MultiElemWithRepeatingElements() { List <Tuple <string, string> > list = new List <Tuple <string, string> >(); list.Add(new Tuple <string, string>("two", "three")); list.Add(new Tuple <string, string>("four", "five")); list.Add(new Tuple <string, string>("one", "two")); list.Add(new Tuple <string, string>("three", "four")); list.Add(new Tuple <string, string>("four", "five")); PathConstructorNoException pathConstructorNoException = new PathConstructorNoException(); var result = pathConstructorNoException.ConstructPath(list); List <Tuple <string, string> > correctList = new List <Tuple <string, string> >(); correctList.Add(new Tuple <string, string>("one", "two")); correctList.Add(new Tuple <string, string>("two", "three")); correctList.Add(new Tuple <string, string>("three", "four")); correctList.Add(new Tuple <string, string>("four", "five")); var firstNotSecond = result.Except(correctList).ToList(); Assert.AreEqual(firstNotSecond.Count(), 0, "using ListExcept"); }