コード例 #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
            });
        }
コード例 #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
            });
        }
コード例 #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));
        }
コード例 #4
0
 public void PassNullToLinkMethod_ShouldException()
 {
     CardPath.LinkCard(null);
 }