Exemple #1
0
        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));
        }
Exemple #2
0
        public void RemoveUnitsThrowsExceptionNegativeInput()
        {
            //arrange
            var sut = new GoodItem();

            //act
            //assert
            System.Exception ex = Assert.Throws <WeLoveTaxesDomainException>(() => sut.RemoveUnits(-5));
        }
Exemple #3
0
        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());
        }