I am trying to write unit Tests for BlogEngine.Core.dll. I wrote a unit test for StripHtml function. The test getting failed (Second Assert Statement)
for input, which has a comment line (e.g:<!—something --->)in two rows. The same test is getting passed for a comment line which spans in one line.
Now, my doubt is, is it a bug? Or Am I missing something? Or Are my tests wrong? .I know little about Regex.
code goes here..
StreamReader reader =
StringBuilder sb =
while (reader.ReadLine() !=
sb = sb.Append(reader.ReadLine());
The second Assert statement is getting failed for a comment line which spans in two rows .
You can reproduce the test results (Pass or Fail) copying any html code into
TextFile1.txt, which has a comment line spanned in one row and two rows ,respectively.
I am also providing StripHtml function in Utils.cs in
Regex STRIP_HTML = new
static string StripHtml(string html)
Please point me in right direction?