AjTalk.Tests.Compilers.Javascript.CompilerTests.CompileSimpleAddMethod C# (CSharp) Method

CompileSimpleAddMethod() private method

private CompileSimpleAddMethod ( ) : void
return void
        public void CompileSimpleAddMethod()
        {
            MethodModel method = ParseMethod("with: a with: b ^a+b");
            this.compiler.CompileMethod(method);
            this.writer.Close();
            string output = this.writer.ToString();
            Assert.IsTrue(ContainsLine(output, "MyClass.prototype['with_with_'] = function(a, b)"));
            Assert.IsTrue(ContainsLine(output, "{"));
            Assert.IsTrue(ContainsLine(output, "return send(a, '+', [b]);"));
            Assert.IsFalse(ContainsLine(output, "return self;"));
            Assert.IsTrue(ContainsLine(output, "};"));
        }