public void AddCustomer_WhenWrongData_ShouldThrow() { //Arrange var lot = new SalesProcessor.Domain.Lot.Lot(_configuration.Object, "Test"); //Act and Assert Assert.ThrowsAny <System.Exception>(() => lot.AddCustomer(null)); }
public void AddData_WhenNotRecognized_ShouldThrow() { //Arrange var line = "008ç2345675434544345çJose da SilvaçRural"; var lot = new SalesProcessor.Domain.Lot.Lot(_configuration.Object, "Test"); //Act Assert.ThrowsAny <System.Exception>(() => lot.AddData(line)); }
public void AddData_WhenCustomer_ShouldAddCustomer() { //Arrange var line = "002ç2345675434544345çJose da SilvaçRural"; var lot = new SalesProcessor.Domain.Lot.Lot(_configuration.Object, "Test"); //Act lot.AddData(line); //Assert Assert.NotEmpty(lot.customers); }
public void AddData_WhenSalesperson_ShouldAddSalesperson() { //Arrange var line = "001ç1234567891234çPedroç50000"; var lot = new SalesProcessor.Domain.Lot.Lot(_configuration.Object, "Test"); //Act lot.AddData(line); //Assert Assert.NotEmpty(lot.salespersons); }
public void AddData_WhenSales_ShouldAddSale() { //Arrange var line = "003ç10ç[1-10-100,2-30-2.50,3-40-3.10]çPedro "; var lot = new SalesProcessor.Domain.Lot.Lot(_configuration.Object, "Test"); //Act lot.AddData(line); //Assert Assert.NotEmpty(lot.sales); }