예제 #1
0
        public void Age_WhenQualityWouldFallBelowZero_ShouldSetQualityToZero()
        {
            // Arrange
            var item = new ConjuredItem("", -2, 2);

            // Act
            item.Age();
            // Assert
            item.Quality.ShouldBe(0);
        }
예제 #2
0
        public void Age_WhenSellInIsNegativeOrZero_ShouldDecreaseQualityByFour(int sellIn)
        {
            // Arrange
            var initialQuality = 10;
            var item           = new ConjuredItem("", sellIn, initialQuality);

            // Act
            item.Age();
            // Assert
            item.Quality.ShouldBe(initialQuality - 4);
        }
예제 #3
0
        public void Age_WhenSellInIsPositive_ShouldDecreaseQualityByTwo(int sellIn)
        {
            // Arrange
            var initialQuality = 10;
            var item           = new ConjuredItem("", sellIn, initialQuality);

            // Act
            item.Age();
            // Assert
            item.Quality.ShouldBe(initialQuality - 2);
        }