in src/main/java/com/atlassian/uwc/converters/sharepoint/ColorConverterTest.java [544:630]
public void testConvertColorHeaderList() {
String input, expected, actual;
QuoteWSConverter quoter = new QuoteWSConverter();
HeaderConverter header = new HeaderConverter();
ListConverter lister = new ListConverter();
input = "<html>" +
"<font size=\"7\" color=\"#8b0000\">But even so the editor is not bad.\n" +
"\n" +
"<font size=\"5\" color=\"#000000\">Let\'s create a [child page|mytestwiki:child page].</font>\n" +
"\n" +
"</font></html>\n" +
"";
expected = "<html>" +"{color:#8b0000}" +
"But even so the editor is not bad.\n" +
"\n" +
"{color}\n" +
"h3. {color:#000000}Let\'s create a [child page|mytestwiki:child page].{color}\n" +
"{color:#8b0000}\n" +
"\n" +
"{color}</html>";
actual = tester.convertColor(input);
actual = quoter.convertQuoteWS(actual);
actual = header.convertHeaders(actual);
actual = quoter.convertQuoteWS(actual);
assertNotNull(actual);
assertEquals(expected, actual);
input = "<html><font size=\"7\" color=\"#8b0000\"><span style=\"background-color:rgb(255, 192, 203)\">It\'s my</span> *party* <span style=\"background-color:rgb(255, 192, 203)\">and I\'ll</span> _cry_ <span style=\"background-color:rgb(255, 192, 203)\">if I want to.</span>\n" +
"</font><ul><li><font size=\"5\" color=\"#8b0000\">Cry if I want to</font></li><li><font size=\"7\" color=\"#8b0000\">Cry <font size=\"4\">if I want to</font></font></li><li/></ul>{quote}<font size=\"7\" color=\"#8b0000\"><font size=\"4\" face=\"Times New Roman\">Formatting oddities of SharePoint have not changed!</font>\n" +
"\n" +
"</font>{quote}<font size=\"7\" color=\"#8b0000\">But even so the editor is not bad.\n" +
"\n" +
"<font size=\"5\" color=\"#000000\">Let\'s create a [child page|mytestwiki:child page].</font>\n" +
"\n" +
"</font></html>\n" +
"";
expected = "<html>{panel:bgColor=#ffc0cb}{color:#8b0000}It\'s my *party* and I\'ll _cry_ if I want to.{color}{panel}\n" +
"\n" +
"* h3. {color:#8b0000}Cry if I want to{color}\n" +
"* {color:#8b0000}Cry if I want to{color}\n" +
"\n" +
"\n" +
"{quote}\n" +
"h4. {color:#8b0000}Formatting oddities of SharePoint have not changed!" +
"\n" +
"\n" +
"{color}\n" +
"{quote}\n" +
"{color:#8b0000}" +
"But even so the editor is not bad.\n" +
"\n" +
"{color}\n" +
"h3. {color:#000000}Let\'s create a [child page|mytestwiki:child page].{color}\n" +
"{color:#8b0000}\n" +
"\n" +
"{color}</html>";
actual = tester.convertColor(input);
actual = quoter.convertQuoteWS(actual);
actual = header.convertHeaders(actual);
actual = lister.convertLists(actual);
actual = quoter.convertQuoteWS(actual);
assertNotNull(actual);
assertEquals(expected, actual);
input = "<html>\n" +
"<span style=\"color:black\"><font face=\"Arial\" size=\"2\">xxxxxx \"xxxxxx\" xxxxxx</font></span>\n" +
"\n" +
"<span style=\"color:black\"><font face=\"Arial\" size=\"2\">xxxxxx</font></span>\n" +
"\n" +
"</html>";
expected = "<html>\n" +
"h6. {color:black}xxxxxx \"xxxxxx\" xxxxxx{color}\n" +
"\n" +
"h6. {color:black}xxxxxx{color}\n" +
"\n" +
"</html>";
actual = tester.convertColor(input);
actual = quoter.convertQuoteWS(actual);
actual = header.convertHeaders(actual);
actual = quoter.convertQuoteWS(actual);
assertNotNull(actual);
assertEquals(expected, actual);
}