Fix unit tests.
This commit is contained in:
parent
548b8e07a6
commit
c21ea14af1
2 changed files with 7 additions and 15 deletions
|
@ -23,7 +23,7 @@ public class HtmlConverterTest extends TestCase {
|
|||
"\n" +
|
||||
"Nice job :)\n" +
|
||||
">> Guess!";
|
||||
String result = HtmlConverter.textToHtml(message, false);
|
||||
String result = HtmlConverter.textToHtml(message);
|
||||
writeToFile(result);
|
||||
assertEquals("<pre style=\"white-space: pre-wrap; word-wrap:break-word; font-family: sans-serif; margin-top: 0px\">Panama!<br /><br />Bob Barker <bob@aol.com> wrote:<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\">a canal<br /><br />Dorothy Jo Gideon <dorothy@aol.com> espoused:<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;\">A man, a plan...<br /></blockquote>Too easy!</blockquote><br />Nice job :)<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\"><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;\">Guess!</blockquote></blockquote></pre>", result);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public class HtmlConverterTest extends TestCase {
|
|||
"> LOL F1RST!!!!!\n" +
|
||||
">\n" +
|
||||
"> :)";
|
||||
String result = HtmlConverter.textToHtml(message, false);
|
||||
String result = HtmlConverter.textToHtml(message);
|
||||
writeToFile(result);
|
||||
assertEquals("<pre style=\"white-space: pre-wrap; word-wrap:break-word; font-family: sans-serif; margin-top: 0px\">*facepalm*<br /><br />Bob Barker <bob@aol.com> wrote:<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\">A wise man once said...<br /><br />LOL F1RST!!!!!<br /><br />:)</blockquote></pre>", result);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class HtmlConverterTest extends TestCase {
|
|||
">>>> four\n" +
|
||||
">>>>> five\n" +
|
||||
">>>>>> six";
|
||||
String result = HtmlConverter.textToHtml(message, false);
|
||||
String result = HtmlConverter.textToHtml(message);
|
||||
writeToFile(result);
|
||||
assertEquals("<pre style=\"white-space: pre-wrap; word-wrap:break-word; font-family: sans-serif; margin-top: 0px\">zero<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\">one<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;\">two<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;\">three<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;\">four<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;\">five<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;\">six</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></pre>", result);
|
||||
}
|
||||
|
|
|
@ -29,12 +29,10 @@ public class ViewablesTest extends AndroidTestCase {
|
|||
|
||||
String expectedText = bodyText;
|
||||
String expectedHtml =
|
||||
"<html><head/><body>" +
|
||||
"<pre style=\"white-space: pre-wrap; word-wrap:break-word; " +
|
||||
"font-family: sans-serif; margin-top: 0px\">" +
|
||||
"K-9 Mail rocks :>" +
|
||||
"</pre>" +
|
||||
"</body></html>";
|
||||
"</pre>";
|
||||
|
||||
assertEquals(expectedText, container.text);
|
||||
assertEquals(expectedHtml, container.html);
|
||||
|
@ -56,9 +54,7 @@ public class ViewablesTest extends AndroidTestCase {
|
|||
|
||||
String expectedText = "K-9 Mail rocks :>";
|
||||
String expectedHtml =
|
||||
"<html><head/><body>" +
|
||||
bodyText +
|
||||
"</body></html>";
|
||||
bodyText;
|
||||
|
||||
assertEquals(expectedText, container.text);
|
||||
assertEquals(expectedHtml, container.html);
|
||||
|
@ -91,7 +87,6 @@ public class ViewablesTest extends AndroidTestCase {
|
|||
"------------------------------------------------------------------------\n\n" +
|
||||
bodyText2;
|
||||
String expectedHtml =
|
||||
"<html><head/><body>" +
|
||||
"<pre style=\"white-space: pre-wrap; word-wrap:break-word; " +
|
||||
"font-family: sans-serif; margin-top: 0px\">" +
|
||||
bodyText1 +
|
||||
|
@ -101,8 +96,7 @@ public class ViewablesTest extends AndroidTestCase {
|
|||
"<pre style=\"white-space: pre-wrap; word-wrap:break-word; " +
|
||||
"font-family: sans-serif; margin-top: 0px\">" +
|
||||
bodyText2 +
|
||||
"</pre>" +
|
||||
"</body></html>";
|
||||
"</pre>";
|
||||
|
||||
|
||||
assertEquals(expectedText, container.text);
|
||||
|
@ -158,7 +152,6 @@ public class ViewablesTest extends AndroidTestCase {
|
|||
"\n" +
|
||||
innerBodyText;
|
||||
String expectedHtml =
|
||||
"<html><head/><body>" +
|
||||
"<pre style=\"white-space: pre-wrap; word-wrap:break-word; " +
|
||||
"font-family: sans-serif; margin-top: 0px\">" +
|
||||
bodyText +
|
||||
|
@ -183,8 +176,7 @@ public class ViewablesTest extends AndroidTestCase {
|
|||
"<pre style=\"white-space: pre-wrap; word-wrap:break-word; " +
|
||||
"font-family: sans-serif; margin-top: 0px\">" +
|
||||
innerBodyText +
|
||||
"</pre>" +
|
||||
"</body></html>";
|
||||
"</pre>";
|
||||
|
||||
assertEquals(expectedText, container.text);
|
||||
assertEquals(expectedHtml, container.html);
|
||||
|
|
Loading…
Reference in a new issue