public void Buy_1_Book_Should_Pay_100() { // Arrange var shop = new Shop(); // Act shop.AddOrders(new List<Book>{ new Book{Id=1} }); // Assert var actualTotal = shop.GetTotal(); var expectedTotal = 100; Assert.AreEqual(expectedTotal, actualTotal); }
public void Buy_2_Different_Books_Should_Pay_190() { // Arrange var shop = new Shop(); // Act shop.AddOrders(new List<Book>{ new Book{Id=1}, new Book{Id=2}, }); // Assert var actualTotal = shop.GetTotal(); var expectedTotal = 190; Assert.AreEqual(expectedTotal, actualTotal); }
public void Buy_Book1_Book2_3Book3_Should_Pay_370() { // Arrange var shop = new Shop(); // Act shop.AddOrders(new List<Book>{ new Book{Id=1}, new Book{Id=2}, new Book{Id=3}, new Book{Id=3}, }); // Assert var actualTotal = shop.GetTotal(); var expectedTotal = 370; Assert.AreEqual(expectedTotal, actualTotal); }