public static void TestAssignment()
        {
            var context = new ExecutionContext(new Python3Calculator());
            var foo = new Variable("foo", context);
            var bar = new Variable("bar", context);
            var boolean = new Literal(false);
            var intNumber = new Literal(3);
            var floatNumber = new Literal(3.0f);

            context.Assign(foo, new Literal(3));
            AssertEquals(foo.AsLiteral(), new Literal(3));
            AssertEquals(foo.AsValue(), 3);

            context.Assign(bar, new Literal(3));
            AssertEquals(bar.AsLiteral(), new Literal(3));
            AssertEquals(bar.AsValue(), 3);

            context.Assign(bar, new Literal(5));
            context.Assign(foo, bar);
            AssertEquals(foo.AsLiteral(), new Literal(5));
            AssertEquals(foo.AsValue(), 5);
            AssertEquals(bar.AsLiteral(), new Literal(5));
            AssertEquals(bar.AsValue(), 5);

            AssertException<InvalidOperationException>(() => context.Assign(boolean, foo));
            AssertException<InvalidOperationException>(() => context.Assign(intNumber, foo));
            AssertException<InvalidOperationException>(() => context.Assign(floatNumber, foo));
        }
        public static void TestVariableArithmetic()
        {
            var context = new ExecutionContext(new Python3Calculator());
            var foo = new Variable("foo", context);
            var bar = new Variable("bar", context);

            context.Assign(foo, new Literal(3));
            context.Assign(bar, new Literal(5.0f));

            AssertEquals(context.Add(foo, bar).AsValue(), 8.0f);
            AssertEquals(context.Add(bar, foo).AsValue(), 8.0f);

            AssertEquals(context.Subtract(foo, bar).AsValue(), -2.0f);
            AssertEquals(context.Subtract(bar, foo).AsValue(), 2.0f);

            AssertEquals(context.Multiply(foo, bar).AsValue(), 15.0f);
            AssertEquals(context.Multiply(bar, foo).AsValue(), 15.0f);

            AssertEquals(context.Divide(foo, bar).AsValue(), 3 / 5.0f);
            AssertEquals(context.Divide(bar, foo).AsValue(), 5.0f / 3);

            AssertEquals(context.Mod(foo, bar).AsValue(), 3.0f);
            AssertEquals(context.Mod(bar, foo).AsValue(), 2.0f);
        }