Пример #1
0
        public void WhenRemovingUsesFromInstance_CountDoesNotGoBelowZero()
        {
            MyItemInstance systemUnderTest = new MyItemInstance();

            systemUnderTest.Count = 10;
            systemUnderTest.RemoveUses(30);

            Assert.AreEqual(0, systemUnderTest.Count);
        }
Пример #2
0
        public void WhenRemovingUsesFromInstance_CountIsChanged()
        {
            MyItemInstance systemUnderTest = new MyItemInstance();

            systemUnderTest.Count = 10;
            systemUnderTest.RemoveUses(3);

            Assert.AreEqual(7, systemUnderTest.Count);
        }
Пример #3
0
        public void WhenCatalogItemDoesNotHaveTag_HasTag_ReturnsFalse()
        {
            IMyCatalogItem mockCatalogItem = Substitute.For <IMyCatalogItem>();

            mockCatalogItem.HasTag("SomeTag").Returns(false);

            MyItemInstance systemUnderTest = new MyItemInstance();

            systemUnderTest.SetCatalogItem(mockCatalogItem);

            Assert.IsFalse(systemUnderTest.HasTag("SomeTag"));
        }