public void DocComments()
{
CodeNamespace ns = new CodeNamespace("System");
ns.Comments.Add(new CodeCommentStatement("Some comment on a namespace"));
var cd = new CodeTypeDeclaration("MyType");
cd.Comments.Add(new CodeCommentStatement("<summary>Insightful comment</summary>", docComment: true));
ns.Types.Add(cd);
var cmm = new CodeMemberMethod() { Name = "SomeMethod" };
cmm.Comments.Add(new CodeCommentStatement("<summary>Another insightful comment</summary>", docComment: true));
cd.Members.Add(cmm);
AssertEqual(ns,
@"// Some comment on a namespace
namespace System {
/// <summary>Insightful comment</summary>
public class MyType {
/// <summary>Another insightful comment</summary>
private void SomeMethod() { }
}
}");
}