ABB.Swum.Tests.ContextBuilderTests.TestBuildMethodContext_FunctionWithClassAndParams C# (CSharp) Метод

TestBuildMethodContext_FunctionWithClassAndParams() приватный Метод

private TestBuildMethodContext_FunctionWithClassAndParams ( ) : void
Результат void
        public void TestBuildMethodContext_FunctionWithClassAndParams() {
            string testSrcML = "<function><type><name>int</name></type> <name><name>CBidMarkup</name><op:operator>::</op:operator><name>modifyBid</name></name><parameter_list>(<param><decl><type><name>bool</name></type> <name>Recalc</name></decl></param>, <param><decl><type><name>char</name><type:modifier>*</type:modifier></type> <name>Foo</name></decl></param>)</parameter_list><block>{ <return>return <expr><lit:literal type=\"number\">0</lit:literal></expr>;</return> }</block></function>";
            XElement xml = XElement.Parse(string.Format(srcMLFormat, testSrcML), LoadOptions.PreserveWhitespace);
            var formals = new FormalParameterRecord[] {new FormalParameterRecord("bool", true, "Recalc"), new FormalParameterRecord("char*", true, "Foo")};

            MethodContext mc1 = new MethodContext("int", true, "CBidMarkup", formals, false, false, false);
            MethodContext mc2 = ContextBuilder.BuildMethodContext(xml.Element(SRC.Function));
            Assert.IsTrue(MethodContextsAreEqual(mc1, mc2));
        }