public void CannotUpdateBookWithNegativePrice() { Assert.Catch(() => { var x = new Book("Real-Time Rendering", "978-1568814247", 78.95m, Currency.EUR); x.UpdatePrice(-9.90m, Currency.CHF); }); }
public void CanUpdateBookWithPrice() { var x = new Book("Real-Time Rendering", "978-1568814247", 78.95m, Currency.EUR); x.UpdatePrice(39.90m, Currency.CHF); Assert.IsTrue(x.Price.Amount == 39.90m); Assert.IsTrue(x.Price.Unit == Currency.CHF); }