Boo.Lang.Parser.Tests.BooParserTestCase.TestUnpackStmt1 C# (CSharp) Method

TestUnpackStmt1() private method

private TestUnpackStmt1 ( ) : void
return void
        public void TestUnpackStmt1()
        {
            Boo.Lang.Compiler.Ast.Module module = ParseTestCase("unpack_stmt_1.boo");
            UnpackStatement us = (UnpackStatement)module.Globals.Statements[0];
            Assert.AreEqual(2, us.Declarations.Count);
            Assert.AreEqual("arg0", us.Declarations[0].Name);
            Assert.AreEqual("arg1", us.Declarations[1].Name);

            MethodInvocationExpression mce = (MethodInvocationExpression)us.Expression;
            MemberReferenceExpression mre = ((MemberReferenceExpression)mce.Target);
            Assert.AreEqual("GetCommandLineArgs", mre.Name);
            Assert.AreEqual("Environment", ((ReferenceExpression)mre.Target).Name);
        }