public void SetUnitPriceThrowsExceptionNegativeInput(decimal newPrice) { //arrange var sut = new GoodItem(24, 2, true, GoodItemTypeEnum.Other, null, new GoodItemDetails()); //act //assert System.Exception ex = Assert.Throws <WeLoveTaxesDomainException>(() => sut.SetUnitPrice(newPrice)); }
public void SetUnitPriceWorksFine() { //arrange var newPrice = 43.489M; var sut = new GoodItem(24, 2, true, GoodItemTypeEnum.Other, null, new GoodItemDetails()); //act sut.SetUnitPrice(newPrice); //assert Assert.Equal(newPrice, sut.GetUnitPrice()); }