コード例 #1
0
 public void ArmorThatWasInInventoryIsNotDoubleCountedWhenEquippedTwice()
 {
     var inventory = new CharacterInventory { _testArmor };
     inventory.EquippedArmor = _testArmor;
     inventory.EquippedArmor = _testArmor;
     inventory.Should().HaveCount(1);
 }
コード例 #2
0
 public void ItemCanBeAddedToInventory()
 {
     var testSubject = new CharacterInventory();
     var item = new Item("Fake item", 0);
     testSubject.Add(item);
     testSubject.Should().Contain(item);
 }
コード例 #3
0
 public void ArmorThatIsUnequippedStaysInInventory()
 {
     var inventory = new CharacterInventory { EquippedArmor = _testArmor };
     inventory.EquippedArmor = null;
     inventory.Should().Contain(_testArmor);
 }