AjScript.Commands.Tests.CommandsTests.ExecuteIfCommandWhenTrue C# (CSharp) Метод

ExecuteIfCommandWhenTrue() приватный Метод

private ExecuteIfCommandWhenTrue ( ) : void
Результат void
        public void ExecuteIfCommandWhenTrue()
        {
            IExpression condition = new ConstantExpression(true);
            ICommand setCommand = new SetVariableCommand("a", new ConstantExpression(1));
            IfCommand command = new IfCommand(condition, setCommand);

            Context context = new Context();

            command.Execute(context);

            Assert.AreEqual(1, context.GetValue("a"));
        }