public void Sulfuras_never_loses_its_quality(int daysPassed, uint expectedQuality) { // Arrange int shelfLife = 20; Inventory inventory = new InventoryBuilder() .With(new SulfurasBuilder() .WithShelfLife(new Days(shelfLife))) .Build(); // Act inventory.HandleDayChanges(daysPassed); // Assert inventory.Should().BeEquivalentTo(new[] { new { ShelfLife = new Days(shelfLife), Quality = new Quality(expectedQuality) } }); }
public void Backstage_passes_increase_in_quality_quickly_until_they_are_due(int daysPassed, uint expectedQuality) { // Arrange int nrDaysUntilConcert = 20; Inventory inventory = new InventoryBuilder() .With(new BackstagePassBuilder() .WhichExpires(new Days(nrDaysUntilConcert)) .WithQuality(new Quality(10))) .Build(); // Act inventory.HandleDayChanges(daysPassed); // Assert inventory.Should().BeEquivalentTo(new[] { new { ShelfLife = new Days(nrDaysUntilConcert - daysPassed), Quality = new Quality(expectedQuality) } }); }