public void GetMargenNetoPorcentual_PORC_USD_Cliente_NULL_Producto() { // Arrange MarginServices marginServices = new MarginServices(); ProductQuote productQuote = new ProductQuote(); Product product = new Product(); Customer customer = new Customer(); SaleModalityCreditRating saleModalityCreditRating = new SaleModalityCreditRating(); saleModalityCreditRating.MinimumMarginPercentage = 5; saleModalityCreditRating.MinimumMarginUSD = 50; customer.MinimumMarginPercentage = 10; customer.MinimumMarginUSD = 100; // Act MininumMarginSale mininumMarginSale = marginServices.GetMargenNetoPorcentual(productQuote, product, customer, saleModalityCreditRating); // Assert Assert.AreEqual(10, mininumMarginSale.MinimumMarginPercentage); Assert.AreEqual(100, mininumMarginSale.MinimumMarginUSD); Assert.AreEqual(mininumMarginSale.MininumMarginSourcePercentage, MarginTypes.MarginCustomer); Assert.AreEqual(mininumMarginSale.MininumMarginSourceUSD, MarginTypes.MarginCustomer); }
public void GetMargenNetoPorcentual_PORC_USD_NULL() { // Arrange MarginServices marginServices = new MarginServices(); ProductQuote productQuote = new ProductQuote(); Product product = new Product(); Customer customer = new Customer(); // Act MininumMarginSale mininumMarginSale = marginServices.GetMargenNetoPorcentual(productQuote, product, customer, null); // Assert Assert.AreEqual(0, mininumMarginSale.MinimumMarginPercentage); Assert.AreEqual(mininumMarginSale.MininumMarginSourcePercentage, MarginTypes.MarginUndefined); }