public void Test_FindBestRoute_Rota1() { string origem = "GRU"; string destino = "CDG"; string rotaEsperada = "GRU - BRC - SCL - ORL - CDG"; string valorEsperado = "40"; var resultado = _routesAppService.FindBestRoute(origem, destino); Assert.AreEqual(resultado.Length, 2); Assert.AreEqual(rotaEsperada, resultado[0]); Assert.AreEqual(valorEsperado, resultado[1]); }
public JsonResult GetSearchBestRoute([FromBody] TripDTO trip) { string[] routeFound = _routesAppService.FindBestRoute(trip.Origin, trip.Destination); return(new JsonResult(new { route = routeFound[0], value = routeFound[1] })); }