Execute() public method

public Execute ( ICharacter, caller, GameManager, manager ) : void
caller ICharacter,
manager GameManager,
return void
コード例 #1
0
ファイル: SkipCommandTests.cs プロジェクト: nulltoken/xunit
    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);
    }
コード例 #2
0
ファイル: SkipCommandTests.cs プロジェクト: jbhensley/xunit
        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);
        }
コード例 #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);
        }