Exemplo n.º 1
0
        public void ReadMemberContent_correctly_parses_seealso_elements_05()
        {
            var xml = @"<seealso cref=""T:SomeNamespace.SomeClass"" href=""http://example.com"" />";

            var expected = new SeeAlsoElement(MemberId.Parse("T:SomeNamespace.SomeClass", Array.Empty <TypeId>()));

            ReadMemberContent_correctly_parses_seealso_elements(xml, expected);
        }
Exemplo n.º 2
0
        public void ReadMemberContent_correctly_parses_seealso_elements_03()
        {
            var xml = @"<seealso href=""http://example.com"" />";

            var expected = new SeeAlsoElement(new Uri("http://example.com"));

            ReadMemberContent_correctly_parses_seealso_elements(xml, expected);
        }
Exemplo n.º 3
0
        public void ReadMemberContent_correctly_parses_seealso_elements_06()
        {
            var xml = @"<seealso cref=""T:SomeNamespace.SomeClass"" href=""http://example.com"">Lorem ipsum dolor sit ament.</seealso>";

            var expected = new SeeAlsoElement(
                MemberId.Parse("T:SomeNamespace.SomeClass", Array.Empty <TypeId>()),
                new TextBlock(new[]
            {
                new TextElement("Lorem ipsum dolor sit ament.")
            }));

            ReadMemberContent_correctly_parses_seealso_elements(xml, expected);
        }
Exemplo n.º 4
0
        public void ReadMemberContent_correctly_parses_seealso_elements_04()
        {
            var xml = @"<seealso href=""http://example.com"">Lorem ipsum dolor sit ament.</seealso>";

            var expected = new SeeAlsoElement(
                new Uri("http://example.com"),
                new TextBlock(new[]
            {
                new TextElement("Lorem ipsum dolor sit ament.")
            }));

            ReadMemberContent_correctly_parses_seealso_elements(xml, expected);
        }
Exemplo n.º 5
0
        private void ReadMemberContent_correctly_parses_seealso_elements(string xml, SeeAlsoElement expected)
        {
            // ARRANGE
            xml = $@"<container>{xml}</container>";

            var sut           = new XmlDocsReader(NullLogger.Instance, new XDocument(), Array.Empty <TypeId>());
            var memberElement = new MemberElement(MemberId.Parse("T:DemoProject.DemoClass", Array.Empty <TypeId>()));

            // ACT
            sut.ReadMemberContent(XElement.Parse(xml), memberElement);

            // ASSERT
            var actual = Assert.Single(memberElement.SeeAlso);

            Assert.Equal(expected, actual);
        }