Execute() public method

public Execute ( ICharacter, caller, GameManager, manager ) : void
caller ICharacter,
manager GameManager,
return void
Ejemplo n.º 1
0
    public void SkipReturnSkipResult()
    {
        MethodInfo method = typeof(SpyStub).GetMethod("Skip");
        SkipCommand command = new SkipCommand(Reflector.Wrap(method), null, "reason");

        MethodResult result = command.Execute(new SpyStub());

        SkipResult skipResult = Assert.IsType<SkipResult>(result);
        Assert.Equal("reason", skipResult.Reason);
    }
Ejemplo n.º 2
0
        public void SkipReturnSkipResult()
        {
            MethodInfo  method  = typeof(SpyStub).GetMethod("Skip");
            SkipCommand command = new SkipCommand(Reflector.Wrap(method), null, "reason");

            MethodResult result = command.Execute(new SpyStub());

            SkipResult skipResult = Assert.IsType <SkipResult>(result);

            Assert.Equal("reason", skipResult.Reason);
        }
Ejemplo n.º 3
0
        public void SkipCommandTest()
        {
            StartGameCommandTest();

            int robotBattery = _context.Robot.BatteryBalance;
            int mass         = _context.Robot.Mass;

            ICommand skipCommand = new SkipCommand(_context);

            skipCommand.Execute();

            Assert.IsFalse(robotBattery == _context.Robot.BatteryBalance);
            Assert.IsTrue(mass == _context.Robot.Mass);
            Assert.IsTrue(_context.State is DecidingState);
        }