public void Can_Parse_TypeParamRef_Comment() { // Given var parser = new CommentParser(); var node = @"<typeparamref name=""test"" />".CreateXmlNode(); // When var result = parser.Parse(node); // Then Assert.NotNull(result); Assert.Equal(@"<typeparamref name=""test"" />", XmlCommentRenderer.Render(result)); }
public void Can_Parse_InlineCode_Comment() { // Given var parser = new CommentParser(); var node = @"<c>Hello World</c>".CreateXmlNode(); // When var result = parser.Parse(node); // Then Assert.NotNull(result); Assert.Equal(@"<c>Hello World</c>", XmlCommentRenderer.Render(result)); }
public void Can_Parse_TypeParam_Comment() { // Given var parser = new CommentParser(); var node = @"<typeparam name=""T"">Hello World</typeparam>".CreateXmlNode(); // When var result = parser.Parse(node); // Then Assert.NotNull(result); Assert.Equal(@"<typeparam name=""T"">Hello World</typeparam>", XmlCommentRenderer.Render(result)); }
public void Can_Parse_See_Comment() { // Given var parser = new CommentParser(); var node = @"<see cref=""System.String"" />".CreateXmlNode(); // When var result = parser.Parse(node); // Then Assert.NotNull(result); Assert.Equal(@"<see cref=""System.String"" />", XmlCommentRenderer.Render(result)); }
public void Can_Parse_Exception_Comment() { // Given var parser = new CommentParser(); var node = @"<exception cref=""SparrowException"">Hello World</exception>".CreateXmlNode(); // When var result = parser.Parse(node); // Then Assert.NotNull(result); Assert.Equal(@"<exception cref=""SparrowException"">Hello World</exception>", XmlCommentRenderer.Render(result)); }
public void Should_Preserve_Whitespace() { // Given var parser = new CommentParser(); var node = @"<value> <see cref=""System.String"" />\t<c>true</c></value>".CreateXmlNode(); // When var result = parser.Parse(node); // Then Assert.NotNull(result); Assert.Equal(@"<value> <see cref=""System.String"" />\t<c>true</c></value>", XmlCommentRenderer.Render(result)); }
public void Can_Parse_Permission_Comment() { // Given var parser = new CommentParser(); var node = @"<permission cref=""System.Security.PermissionSet"">Hello World</permission>".CreateXmlNode(); // When var result = parser.Parse(node); // Then Assert.NotNull(result); Assert.Equal(@"<permission cref=""System.Security.PermissionSet"">Hello World</permission>", XmlCommentRenderer.Render(result)); }