Ejemplo n.º 1
0
        ToMsBuildElementHelp_WithXmHelpParagraphWithAdditionalContent_ShouldReturnObjectWithCorrectAdditionalContent()
        {
            string additional = "AdditionalContent";

            Mock <IXmlCommentHelpParagraph> xmlHelpParagraph = new Mock <IXmlCommentHelpParagraph>();

            xmlHelpParagraph.Setup(hp => hp.Additional).Returns(additional);
            xmlHelpParagraph.Setup(hp => hp.Content).Returns(new List <string>());

            IMsBuildElementHelpParagraph converted = XmlHelpExtension.ToMsBuildElementHelp(xmlHelpParagraph.Object);

            Assert.AreEqual(additional, converted.Additional);
        }
Ejemplo n.º 2
0
        public void ToMsBuildElementHelp_WithXmHelpParagraphWithName_ShouldReturnObjectWithCorrectName()
        {
            string name = "Name";

            Mock <IXmlCommentHelpParagraph> xmlHelpParagraph = new Mock <IXmlCommentHelpParagraph>();

            xmlHelpParagraph.Setup(hp => hp.Name).Returns(name);
            xmlHelpParagraph.Setup(hp => hp.Content).Returns(new List <string>());

            IMsBuildElementHelpParagraph converted = XmlHelpExtension.ToMsBuildElementHelp(xmlHelpParagraph.Object);

            Assert.AreEqual(name, converted.Name);
        }
Ejemplo n.º 3
0
        public void ToMsBuildElementHelp_WithXmHelpParagraphWithContent_ShouldReturnObjectWithCorrectContent()
        {
            string content = "Content";

            Mock <IXmlCommentHelpParagraph> xmlHelpParagraph = new Mock <IXmlCommentHelpParagraph>();

            xmlHelpParagraph.Setup(hp => hp.Content).Returns(new List <string>()
            {
                content
            });

            IMsBuildElementHelpParagraph converted = XmlHelpExtension.ToMsBuildElementHelp(xmlHelpParagraph.Object);

            Assert.AreEqual(content, converted.Content);
        }