Exemple #1
0
        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));
        }
Exemple #2
0
        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());
        }