public void WhenRemovingUsesFromInstance_CountDoesNotGoBelowZero() { MyItemInstance systemUnderTest = new MyItemInstance(); systemUnderTest.Count = 10; systemUnderTest.RemoveUses(30); Assert.AreEqual(0, systemUnderTest.Count); }
public void WhenRemovingUsesFromInstance_CountIsChanged() { MyItemInstance systemUnderTest = new MyItemInstance(); systemUnderTest.Count = 10; systemUnderTest.RemoveUses(3); Assert.AreEqual(7, systemUnderTest.Count); }
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")); }