public void ExecuteCompositeCommand()
{
Context context = new Context();
SetVariableCommand command1 = new SetVariableCommand("a", new ConstantExpression("bar"));
SetVariableCommand command2 = new SetVariableCommand("b", new ConstantExpression(1));
SetVariableCommand command3 = new SetVariableCommand("c", new VariableExpression("a"));
List<ICommand> commands = new List<ICommand>();
commands.Add(command1);
commands.Add(command2);
commands.Add(command3);
CompositeCommand command = new CompositeCommand(commands);
command.Execute(context);
Assert.AreEqual("bar", context.GetValue("a"));
Assert.AreEqual(1, context.GetValue("b"));
Assert.AreEqual("bar", context.GetValue("c"));
}