public void ThrowArgumentNullException_WhenNullStringArgumentsPassed() { var attackCommand = new AttackCommand(); var bmanager = new Mock <IBattleManager>(); Assert.Throws <ArgumentNullException>(() => attackCommand.ProcessCommand(bmanager.Object, null)); }
public void ThrowArgumentException_WhenLessStringArgumentsArePassed() { var attackCommand = new AttackCommand(); var bmanager = new Mock <IBattleManager>(); Assert.Throws <ArgumentException>(() => attackCommand.ProcessCommand(bmanager.Object, new string[] { "Pesho" })); }
public void CallAddCreaturesMethod_WhenValidDataIsPassed() { var attackCommand = new AttackCommand(); var bmanager = new Mock <IBattleManager>(); bmanager.Setup(x => x.Attack(It.IsAny <CreatureIdentifier>(), It.IsAny <CreatureIdentifier>())); attackCommand.ProcessCommand(bmanager.Object, new string[] { "Archangel(2)", "Angel(1)" }); bmanager.Verify(); }
public void ThrowArgumentNullException_WhenNullBattleManagerIsPassed() { var attackCommand = new AttackCommand(); Assert.Throws <ArgumentNullException>(() => attackCommand.ProcessCommand(null, new string[] { })); }