예제 #1
0
        public void CheckSortRoute_CheckEmpty_ExpectOk()
        {
            var composer = new RouteComposer();
            var routes   = composer.SortRoute(new Route[0]);

            Assert.AreEqual(Enumerable.Empty <Route>(), routes);
        }
예제 #2
0
        public void CheckSortRoute_CheckOne_ExpectOk()
        {
            var composer = new RouteComposer();
            var routes   = composer.SortRoute(new [] { new Route {
                                                           From = "Мельбурн", To = "Кельн"
                                                       } });

            Assert.AreEqual("Мельбурн → Кельн", routes.First().ToString());
        }
예제 #3
0
        public void CheckSortRoute_CheckTwoReverse_ExpectOk()
        {
            var composer = new RouteComposer();
            var routes   = composer.SortRoute(new[] { new Route {
                                                          From = "Кельн", To = "Москва"
                                                      }, new Route {
                                                          From = "Мельбурн", To = "Кельн"
                                                      } });

            Assert.AreEqual("Мельбурн → Кельн, Кельн → Москва", string.Join(", ", routes.Select(r => r.ToString())));
        }