Пример #1
0
        public void SellInShouldNeverBeLessThan1(int sellIn)
        {
            // Arrange

            InventoryItem systemUnderTest = new Soap(sellIn, 1);

            // Act

            systemUnderTest.MatureOvernight();

            // Assert

            systemUnderTest.SellIn.ShouldBe(1);
        }
Пример #2
0
        public void QualityShouldNeverBeOver50(int quality)
        {
            // Arrange

            InventoryItem systemUnderTest = new Soap(1, quality);

            // Act

            systemUnderTest.MatureOvernight();

            // Assert

            systemUnderTest.Quality.ShouldBe(50);
        }
Пример #3
0
        public void ValuesShouldNotChangeInRange(int sellIn, int quality)
        {
            // Arrange

            InventoryItem systemUnderTest = new Soap(sellIn, quality);

            // Act

            systemUnderTest.MatureOvernight();

            // Assert

            systemUnderTest.SellIn.ShouldBe(sellIn);
            systemUnderTest.Quality.ShouldBe(quality);
        }