public void Apply_NotACharacter_Test() { var entity = Mock.Of <IEntity>(); var encumbered = new Encumbered(); encumbered.Apply(entity); Assert.IsTrue(true); // If we made it here without exception then the test passed }
public void Remove_NoConditions_Test() { var character = CreateMockCharacter(); var encumbered = new Encumbered(); encumbered.Apply(character); encumbered.Remove(character); Assert.AreEqual(0, character.Conditions.Count); }
public void Apply_Character_WithExistingEncumberedCondition_Test() { var character = CreateMockCharacter(); character.Conditions.Add(new Encumbered()); var encumbered = new Encumbered(); encumbered.Apply(character); }
public void Apply_Character_NoConditions_Test() { var character = CreateMockCharacter(); var encumbered = new Encumbered(); encumbered.Apply(character); Assert.IsTrue(character.Conditions.Any(c => c.Id == EntityIds.ENCUMBERED_CONDITION_ID)); Assert.IsTrue(character.Conditions.Any(c => c.Id == EntityIds.CLUMSY_CONDITION_ID)); Assert.AreEqual(1, character.Conditions.First(c => c.Id == EntityIds.CLUMSY_CONDITION_ID).Level); }