Beispiel #1
0
        public void MultipleSameCityHead()
        {
            var c1 = new CardPath(new City("1"), new City("2"));
            var c2 = new CardPath(new City("2"), new City("3"));
            var c3 = new CardPath(new City("3"), new City("1"));

            CardPath.LinkCard(new List <CardPath> {
                c1, c2, c3
            });
        }
Beispiel #2
0
        public void CheckForCircle()
        {
            var c1 = new CardPath(new City("1"), new City("2"));
            var c2 = new CardPath(new City("2"), new City("1"));
            var c3 = new CardPath(new City("2"), new City("3"));
            var c4 = new CardPath(new City("3"), new City("4"));
            var c5 = new CardPath(new City("4"), new City("2"));

            CardPath.LinkCard(new List <CardPath> {
                c1, c2
            });
        }
Beispiel #3
0
        public void CheckSort()
        {
            var c1 = new CardPath(new City("1"), new City("2"));
            var c2 = new CardPath(new City("2"), new City("3"));
            var c3 = new CardPath(new City("3"), new City("4"));

            var arr = CardPath.LinkCard(new List <CardPath> {
                c1, c3, c2
            }).ToArray();

            Assert.IsTrue(arr[0].Equals(c1));
            Assert.IsTrue(arr[1].Equals(c2));
            Assert.IsTrue(arr[2].Equals(c3));
        }
Beispiel #4
0
 public void PassNullToLinkMethod_ShouldException()
 {
     CardPath.LinkCard(null);
 }