SkipCommand.Execute C# (CSharp) Метод

Execute() публичный Метод

public Execute ( ICharacter, caller, GameManager, manager ) : void
caller ICharacter,
manager GameManager,
Результат void
    public void Execute(ICharacter caller, GameManager manager)
    {
        Receiver.SetUserAction(GameActions.SkipAction);
        if (caller == null)
            throw new ArgumentException();
        if (manager == null)
            throw new ArgumentException();
        manager.GoToNextCharacter();
    }

Usage Example

Пример #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);
    }
All Usage Examples Of SkipCommand::Execute