public void TestAcceptCommand(bool shouldExecuteFollowUps, int expectedFollowUpResultCount, System.Type actionType) { MockTurnManager mtm_true = new MockTurnManager(shouldExecuteFollowUps); ISpiteAction action = (ISpiteAction)System.Activator.CreateInstance(actionType); IReaction[] results = mtm_true.AcceptCommand(new AlwaysFailActionCommand(null, action)); Assert.IsNotEmpty(results); Assert.AreEqual(results.Length, expectedFollowUpResultCount); }
/// <summary> /// Constructs the basic command. It is recommended that base classes don't /// require the executor parameter to be of the same type, but that it be /// of the type of object executing the command. /// </summary> /// <param name="action">The action being performed by this command</param> /// <param name="executor">The object executing the command.</param> public CommandBase(ISpiteAction action, object executor) { this.action = action; Executor = executor; }
public AlwaysFailActionCommand(ITeammate user, ISpiteAction action) : base(action, user) { }