public void Apply_NotACharacter_Test() { var entity = Mock.Of <IEntity>(); var fatigued = new Fatigued(); fatigued.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 fatigued = new Fatigued(); fatigued.Apply(character); fatigued.Remove(character); Assert.AreEqual(0, character.Conditions.Count); }
public void Apply_Character_WithExistingFatiguedCondition_Test() { var character = CreateMockCharacter(); character.Conditions.Add(new Fatigued()); var fatigued = new Fatigued(); fatigued.Apply(character); }
public void Apply_Character_NoConditions_Test() { var character = CreateMockCharacter(); var fatigued = new Fatigued(); fatigued.Apply(character); Assert.AreEqual(EntityIds.FATIGUED_CONDITION_ID, character.Conditions[0].Id); Assert.AreSame(fatigued, character.Conditions[0]); Assert.AreEqual(ModifierType.Status, character.Conditions[0].Modifier.Type); Assert.AreEqual(-1, character.Conditions[0].Modifier.Value); Assert.IsTrue(character.Conditions[0].AppliesTo.Contains(EntityIds.AC_ID)); Assert.IsTrue(character.Conditions[0].AppliesTo.Contains(EntityIds.FORT_SAVE_ID)); Assert.IsTrue(character.Conditions[0].AppliesTo.Contains(EntityIds.REFLEX_SAVE_ID)); Assert.IsTrue(character.Conditions[0].AppliesTo.Contains(EntityIds.WILL_SAVE_ID)); }