AjScript.Commands.Tests.CommandsTests.ExecuteIfCommandWhenTrue C# (CSharp) Method

ExecuteIfCommandWhenTrue() private method

private ExecuteIfCommandWhenTrue ( ) : void
return 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"));
        }