Esempio n. 1
0
        public void QualityConjured()
        {
            Conjured item = new Conjured("testItem", 2, 6, (int)Product.ProductType.Conjured);

            item.Update();
            Assert.That(item.quality.Equals(4));
        }
Esempio n. 2
0
        public void Conjured_Item_Update()
        {
            Conjured item = new Conjured()
            {
                Name    = "Conjured",
                Quality = 10,
                SellIn  = 2
            };

            item.Update();
            Assert.AreEqual(8, item.Quality);
            Assert.AreEqual(1, item.SellIn);
            item.Update();
            Assert.AreEqual(6, item.Quality);
            Assert.AreEqual(0, item.SellIn);
            item.Update();
            Assert.AreEqual(2, item.Quality);
            Assert.AreEqual(-1, item.SellIn);
        }
Esempio n. 3
0
        public void Test_Conjured_Update_Twice_ReturnOk()
        {
            // Arrange
            Conjured conjured = new Conjured("Backstage", 12, 2);

            //Act
            conjured.Update();

            //Assert
            Assert.Equal(0, conjured.Quality);
            Assert.Equal(11, conjured.SellIn);
        }