public override string GetContent() { ParameterInfo[] parameters = Method.GetParameters(); PipeTableDocumentComponent parameterTable = new PipeTableDocumentComponent("Name", "Description", "Type"); foreach (ParameterInfo parameter in parameters) { parameterTable.AddRow(parameter.Name, DescriptionProvider.GetParameterDescription(parameter), parameter.ParameterType.Name); } return(parameterTable.GetContent()); }
public void PipeTableShouldRenderMarkdownTable() { PipeTableDocumentComponent doc = new PipeTableDocumentComponent("Header 1", "Header 2", "Another", "And Another") { Title = "A Pipe Table Test" }; doc.AddRow("some value", "more stuff here", "more", "again"); string expected = @"#A Pipe Table Test |Header 1|Header 2|Another|And Another| |----------|----------|----------|----------| |some value|more stuff here|more|again| "; string output = doc.Render(); OutFormat(output); Expect.AreEqual(expected, output); }