public void Test_9_can_start_new_sale_when_current_sale_paid() { var sut = new Index(); sut.AddItem(productId: 1, quantity: 1); sut.AddPayment(sut.Sale.SaleItems.First().TotalPrice); var result = sut.StartNewSale(); Assert.True(result.IsSuccess, "Unable to start a new sale when current sale paid"); }
public void Test_9_cannot_start_new_sale_when_current_sale_overpaid() { var sut = new Index(); sut.AddItem(productId: 1, quantity: 1); sut.AddPayment(sut.Sale.SaleItems.First().TotalPrice * 2); var result = sut.StartNewSale(); Assert.False(result.IsSuccess, "Started a new sale when current sale was overpaid"); }