public void Attack_AttackingEmptyCharcater() { var human = new TestCharacters().InjuerdHuman; var emptyCharacter = new Character(); Action attack = () => human.Attack(emptyCharacter); attack.ShouldThrow <NullReferenceException>(); }
public void Attack_NullAttack() { var human = new TestCharacters().InjuerdHuman; Action attack = () => human.Attack(null); attack.ShouldThrow <NullReferenceException>(); }
public void Attack_SelfAttack() { var human = new TestCharacters().InjuerdHuman; Action attack = () => human.Attack(human); attack.ShouldThrow <InvalidOperationException>().WithMessage("Character can not Attack it self!"); }
public void Attack_Human_Attacks_Elve() { var human = new TestCharacters().InjuerdHuman; var elve = new TestCharacters().Elve; human.Attack(elve); elve.CurrentFluentAttributes.LifePoints.Should().BeLessOrEqualTo(11) .And.BeGreaterOrEqualTo(6); }
public void Attack_EqiuppedElve_Attacks_Human() { var human = new TestCharacters().InjuerdHuman; var elve = new TestCharacters().Elve; var sword = new TestItems().Sword; elve.Eqip(sword); elve.Attack(human); human.CurrentFluentAttributes.LifePoints.Should().BeLessOrEqualTo(0) .And.BeGreaterOrEqualTo(-5); }