Ejemplo n.º 1
0
        public void ValuesUpdateCorrectly(string itemName, int initSellIn, int initQuality, int expectedQuality)
        {
            var item = new Item {
                Name = itemName, Quality = initQuality, SellIn = initSellIn
            };
            var update = processor.UpdateItem(item);

            Assert.AreEqual(itemName, update.Name, "Name should not have changed");
            Assert.AreEqual(initSellIn - 1, update.SellIn, "SellIn value not correctly updated");
            Assert.AreEqual(expectedQuality, update.Quality, "Quality value not correctly updated");
            Assert.IsTrue(update.IsValid, "Item should be marked Valid");
        }
Ejemplo n.º 2
0
 public Task <Item> UpdateItem(Guid id, Guid itemId, ModifiedItem item)
 {
     return(_context.UpdateItem(id, itemId, item));
 }