public void there_should_be_5_sellin_definitions() { var item = new Item(); var definitions = item.GetType().Assembly.GetAllDerivedTypes<ISellByDefinition>(); Assert.AreEqual(2, definitions.Count); }
public void it_should_increase_the_quality_of_brie() { // Arrange var item = new Item{ Name = ProductName.AgedBrie, Quality = 10, SellIn = 4 }; // Act this.subject.Handle(item); // Assert Assert.AreEqual(11, item.Quality); }
public void it_should_decrease_the_quality_of_standard_items() { // Arrange var item = new Item { Name = ProductName.DexterityVest, Quality = 10, SellIn = 4 }; // Act this.subject.Handle(item); // Assert Assert.AreEqual(9, item.Quality); }
public void should_handle_agedbrie_product() { // arrange var item = new Item { Name = ProductName.AgedBrie, Quality = 10, SellIn = 5 }; // act var canHandle = this.subject.CanHandle(item.Name); // assert Assert.IsTrue(canHandle); }
public void should_increase_quality() { // arrange var item = new Item { Name = ProductName.AgedBrie, Quality = 10, SellIn = 5 }; // act var canHandle = this.subject.CanHandle(ProductName.AgedBrie); this.subject.UpdateQuality(item); // assert Assert.IsTrue(canHandle); Assert.AreEqual(11, item.Quality); }