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); }
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); }
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); }
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); }
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); }