コード例 #1
0
ファイル: ChainBuilderTests.cs プロジェクト: kob888/Traveling
        public void ClosetChain_AddFirstObjectFromUnsortedListToSortedList_FirstObjectFromUnsortedListAddedToSortedList()
        {
            var result = _build.ClosetChain();

            Assert.That(result.First().Departure, Is.EqualTo("Мельбурн"));
            Assert.That(result.First().Arrival, Is.EqualTo("Кельн"));
        }
コード例 #2
0
ファイル: ChainBuilderTests.cs プロジェクト: kob888/Traveling
        public void ClosetChain_SortingClosetChain_ResultFirstObjectDepartureEqualsResultLastObjectArrival()
        {
            var newUnsortedList = new List <TravelCard>()
            {
                new TravelCard {
                    Departure = "Мельбурн", Arrival = "Кельн"
                },
                new TravelCard {
                    Departure = "Москва", Arrival = "Мельбурн"
                },
                new TravelCard {
                    Departure = "Кельн", Arrival = "Москва"
                }
            };
            var newBuild = new ChainBuilder(newUnsortedList);

            var result = newBuild.ClosetChain();

            Assert.That(result.First().Departure, Is.EqualTo(result.Last().Arrival));
        }