public void CalcularMargenUtilidad_FechaPedidoMesNoviembre_Retorna30() { //Arrange DateTime dtFechaPedido = new DateTime(2020, 11, 06); CalculadorPaqueteriaDHLService calculadorPaqueteriaDHLService = new CalculadorPaqueteriaDHLService(); //Act Double dUtilidad = calculadorPaqueteriaDHLService.CalcularMargenUtilidad(dtFechaPedido); //Arrange Assert.IsTrue(dUtilidad == 30); }
public void CalculadorTiempoReparto_ITransporteCero_Retorna0() { //Arrange Double dTiempoReparto = 0; int iTransporte = 0; CalculadorPaqueteriaDHLService calculadorPaqueteriaDHLService = new CalculadorPaqueteriaDHLService(); //Act dTiempoReparto = calculadorPaqueteriaDHLService.CalculadorTiempoReparto(iTransporte); //Arrange Assert.IsTrue(dTiempoReparto == 0); }
public void CalculadorTiempoReparto_ITransporteTerrestre_Retorna12() { //Arrange Double dTiempoReparto = 0; int iTransporte = (int)EnumTransportes.Terrestre; CalculadorPaqueteriaDHLService calculadorPaqueteriaDHLService = new CalculadorPaqueteriaDHLService(); //Act dTiempoReparto = calculadorPaqueteriaDHLService.CalculadorTiempoReparto(iTransporte); //Arrange Assert.IsTrue(dTiempoReparto == 12); }
public void CalculadorTiempoReparto_ITransporteMaritimo_Retorna20() { //Arrange Double dTiempoReparto = 0; int iTransporte = (int)EnumTransportes.Marítimo; CalculadorPaqueteriaDHLService calculadorPaqueteriaDHLService = new CalculadorPaqueteriaDHLService(); //Act dTiempoReparto = calculadorPaqueteriaDHLService.CalculadorTiempoReparto(iTransporte); //Arrange Assert.IsTrue(dTiempoReparto == 20); }
public void CalculadorTiempoReparto_ITransporteAereo_Retorna3() { //Arrange Double dTiempoReparto = 0; int iTransporte = (int)EnumTransportes.Aéreo; CalculadorPaqueteriaDHLService calculadorPaqueteriaDHLService = new CalculadorPaqueteriaDHLService(); //Act dTiempoReparto = calculadorPaqueteriaDHLService.CalculadorTiempoReparto(iTransporte); //Arrange Assert.IsTrue(dTiempoReparto == 3); }
public ICalculadorPaqueteriaService CrearInstancia(int _iPaqueteria) { ICalculadorPaqueteriaService calculadorPaqueteriaService = null; switch (_iPaqueteria) { case (int)EnumPaqueterias.DHL: calculadorPaqueteriaService = new CalculadorPaqueteriaDHLService(); break; case (int)EnumPaqueterias.Estafeta: calculadorPaqueteriaService = new CalculadorPaqueteriaEstafetaService(); break; case (int)EnumPaqueterias.Fedex: calculadorPaqueteriaService = new CalculadorPaqueteriaFedexService(); break; } return(calculadorPaqueteriaService); }