public void Apply_ApplyWhenValueZero_ThrowsException() { var character = CreateMockCharacter(); var sickened = new Sickened(0); sickened.Apply(character); Assert.AreEqual(0, character.Conditions.Count); }
public void Apply_NotACharacter_Test() { var entity = Mock.Of <IEntity>(); var sickened = new Sickened(1); sickened.Apply(entity); Assert.IsTrue(true); // If we made it here with exception then the test passed }
public void Apply_Character_WithExistingSickenedCondition_ThrowsException_Test() { var character = CreateMockCharacter(); character.Conditions.Add(new Sickened(1)); var sickened = new Sickened(2); sickened.Apply(character); }
public void Apply_Character_NoConditions_Test() { var character = CreateMockCharacter(); var sickened = new Sickened(1); sickened.Apply(character); Assert.AreEqual(EntityIds.SICKENED_CONDITION_ID, character.Conditions[0].Id); Assert.AreEqual(ModifierType.Status, character.Conditions[0].Modifier.Type); Assert.AreEqual(-1, character.Conditions[0].Modifier.Value); Assert.AreSame(sickened, character.Conditions[0]); }