public void CreateMethodComment() { var method = new MockMethod(); var instance = new DefaultEnglishCommentCreator(); method.Description = "A Test description"; CodeCommentStatementCollection result = instance.CreateMethodComment(method); Assert.IsNotNull(result); Assert.AreEqual(1, result.Count); Assert.IsNotNull(result[0].Comment); Assert.AreEqual("<summary>A Test description</summary>", result[0].Comment.Text); method.Description = "A <nasty> \"description\""; result = instance.CreateMethodComment(method); Assert.AreEqual("<summary>A <nasty> "description"</summary>", result[0].Comment.Text); }
public void CreateMethodComment() { var method = new MockMethod(); var instance = new DefaultEnglishCommentCreator(); method.Description = "A Test description"; CodeCommentStatementCollection result = instance.CreateMethodComment(method); Assert.IsNotNull(result); Assert.AreEqual(1, result.Count); Assert.IsNotNull(result[0].Comment); Assert.AreEqual("<summary>A Test description</summary>", result[0].Comment.Text); method.Description = "A <nasty> \"description\""; result = instance.CreateMethodComment(method); Assert.AreEqual("<summary>A <nasty> "description"</summary>", result[0].Comment.Text); }
public void CreateMethodCommentValidateParams() { var instance = new DefaultEnglishCommentCreator(); Assert.Throws(typeof(ArgumentNullException), () => instance.CreateMethodComment(null)); }
public void CreateMethodCommentValidateParams() { var instance = new DefaultEnglishCommentCreator(); Assert.Throws(typeof(ArgumentNullException), () => instance.CreateMethodComment(null)); }