コード例 #1
0
            [InlineData(int.MinValue)] // This rolls over to int.MaxValue. At nearly 6 million years past it's SellIn date it's an edge case we can ignore
            public void ReturnsUpdatedSellIn(int sellIn)
            {
                const int SELLIN_STANDARD_ADJUSTMENT = 1;

                int updatedSellIn = InventoryManagementRules.GetUpdatedSellIn(sellIn);

                Assert.Equal(sellIn - SELLIN_STANDARD_ADJUSTMENT, updatedSellIn);
            }
コード例 #2
0
        public void SellInDecreases(string itemName, int sellIn, int quality)
        {
            var finestGood = new FinestGood(itemName, sellIn, quality);

            int expectedSellIn = InventoryManagementRules.GetUpdatedSellIn(sellIn);

            new AgedBrieItemUpdaterRuleset().ApplyUpdates(finestGood);

            Assert.Equal(expectedSellIn, finestGood.SellIn);
        }