public void CheckSortRoute_CheckEmpty_ExpectOk() { var composer = new RouteComposer(); var routes = composer.SortRoute(new Route[0]); Assert.AreEqual(Enumerable.Empty <Route>(), routes); }
public void CheckSortRoute_CheckOne_ExpectOk() { var composer = new RouteComposer(); var routes = composer.SortRoute(new [] { new Route { From = "Мельбурн", To = "Кельн" } }); Assert.AreEqual("Мельбурн → Кельн", routes.First().ToString()); }
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()))); }