public async Task CalcularSemEnderecoTest() { var calcularRota = new CalcularRota(); var calcularRotaModel = new CalcularRotaModel(); var rota = await calcularRota.Calcular(mapLinkApiFactory, calcularRotaModel); }
public async Task CalcularTest() { var calcularRota = new CalcularRota(); var calcularRotaModel = new CalcularRotaModel(); calcularRotaModel.Enderecos = new List<EnderecoModel>(); calcularRotaModel.Enderecos.Add(new EnderecoModel()); calcularRotaModel.Enderecos.Add(new EnderecoModel()); var rota = await calcularRota.Calcular(mapLinkApiFactory, calcularRotaModel); Assert.AreEqual(rota.CustoCombustivel, rotaModel.CustoCombustivel); Assert.AreEqual(rota.CustoTotal, rotaModel.CustoTotal); Assert.AreEqual(rota.Distancia, rotaModel.Distancia); Assert.AreEqual(rota.TempoTotal, rotaModel.TempoTotal); }