Exemple #1
0
        public void ItShouldNotDecreaseStockUnderZero()
        {
            const string beerLabel       = "Sample Label";
            const string beerDescription = "Sample Description";
            const int    beerStock       = 250;

            var beer = new Beer(null, beerLabel, beerDescription, beerStock);

            beer.DecreaseStock(300);

            Assert.Equal(0, beer.Stock.Value);
        }
Exemple #2
0
        public void ItShouldDecreaseStockWithNegativeValue()
        {
            const string beerLabel       = "Sample Label";
            const string beerDescription = "Sample Description";
            const int    beerStock       = 250;

            var beer = new Beer(null, beerLabel, beerDescription, beerStock);

            beer.DecreaseStock(-5);

            Assert.Equal(245, beer.Stock.Value);
        }