Beispiel #1
0
        public void AddParameterMarkup_WithTypeAndKeyword()
        {
            var output         = new XElement("Signature");
            var parameterInfos = typeof(MemberSignatureTestClass).GetMethod("MethodWithParams").GetParameters();

            // int intParam, string stringParam, AssemblyBuilder assemblyBuilderParam
            _outputFormatter.AddParameterMarkup(parameterInfos, output);
            var expectedOutput = new XElement(
                "Signature",
                new XElement("Text", "("),
                new XElement("Type", "System.Int32", new XAttribute("languageType", "Keyword")),
                new XElement("ParameterName", "intParam"),
                new XElement("Text", ","),
                new XElement("Type", "System.String", new XAttribute("languageType", "Keyword")),
                new XElement("ParameterName", "stringParam"),
                new XElement("Text", ","),
                new XElement("Type", "MixinXRef.AssemblyResolver", new XAttribute("languageType", "Type")),
                new XElement("ParameterName", "assemblyBuilderParam"),
                new XElement("Text", ")")
                );

            Assert.That(output.ToString(), Is.EqualTo(expectedOutput.ToString()));
        }