public void RemoveUnitsThrowsExceptionNegativeResult() { //arrange var sut = new GoodItem(24, 1, true, GoodItemTypeEnum.Other, null, new GoodItemDetails()); //act //assert System.Exception ex = Assert.Throws <WeLoveTaxesDomainException>(() => sut.RemoveUnits(-2)); }
public void RemoveUnitsThrowsExceptionNegativeInput() { //arrange var sut = new GoodItem(); //act //assert System.Exception ex = Assert.Throws <WeLoveTaxesDomainException>(() => sut.RemoveUnits(-5)); }
public void RemoveUnitsWorksFine() { //arrange var sut = new GoodItem(24, 2, true, GoodItemTypeEnum.Other, null, new GoodItemDetails()); //act sut.RemoveUnits(1); //assert Assert.Equal(1, sut.GetUnits()); }