1 package test.net.sourceforge.pmd.renderers; 2 3 import net.sourceforge.pmd.PMD; 4 import net.sourceforge.pmd.Report.ProcessingError; 5 import net.sourceforge.pmd.renderers.AbstractRenderer; 6 import net.sourceforge.pmd.renderers.VBHTMLRenderer; 7 8 public class VBHTMLRendererTest extends AbstractRendererTst { 9 10 public AbstractRenderer getRenderer() { 11 return new VBHTMLRenderer(); 12 } 13 14 public String getExpected() { 15 return "<html><head><title>PMD</title></head><style type=\"text/css\"><!--" + PMD.EOL + 16 "body { background-color: white; font-family:verdana, arial, helvetica, geneva; font-size: 16px; font-style: italic; color: black; }" + PMD.EOL + 17 ".title { font-family: verdana, arial, helvetica,geneva; font-size: 12px; font-weight:bold; color: white; }" + PMD.EOL + 18 ".body { font-family: verdana, arial, helvetica, geneva; font-size: 12px; font-weight:plain; color: black; }" + PMD.EOL + 19 "#TableHeader { background-color: #003366; }" + PMD.EOL + 20 "#RowColor1 { background-color: #eeeeee; }" + PMD.EOL + 21 "#RowColor2 { background-color: white; }" + PMD.EOL + 22 "--></style><body><center><table border=\"0\" width=\"80%\"><tr id=TableHeader><td colspan=\"2\"><font class=title> n/a</font></tr>" + PMD.EOL + 23 "<tr id=RowColor2><td width=\"50\" align=\"right\"><font class=body>1 </font></td><td><font class=body>msg</font></td></tr>" + PMD.EOL + 24 "</table><br></center></body></html>"; 25 } 26 27 public String getExpectedEmpty() { 28 return ""; 30 } 31 32 public String getExpectedMultiple() { 33 return "<html><head><title>PMD</title></head><style type=\"text/css\"><!--" + PMD.EOL + 34 "body { background-color: white; font-family:verdana, arial, helvetica, geneva; font-size: 16px; font-style: italic; color: black; }" + PMD.EOL + 35 ".title { font-family: verdana, arial, helvetica,geneva; font-size: 12px; font-weight:bold; color: white; }" + PMD.EOL + 36 ".body { font-family: verdana, arial, helvetica, geneva; font-size: 12px; font-weight:plain; color: black; }" + PMD.EOL + 37 "#TableHeader { background-color: #003366; }" + PMD.EOL + 38 "#RowColor1 { background-color: #eeeeee; }" + PMD.EOL + 39 "#RowColor2 { background-color: white; }" + PMD.EOL + 40 "--></style><body><center><table border=\"0\" width=\"80%\"><tr id=TableHeader><td colspan=\"2\"><font class=title> n/a</font></tr>" + PMD.EOL + 41 "<tr id=RowColor2><td width=\"50\" align=\"right\"><font class=body>1 </font></td><td><font class=body>msg</font></td></tr>" + PMD.EOL + 42 "<tr id=RowColor1><td width=\"50\" align=\"right\"><font class=body>1 </font></td><td><font class=body>msg</font></td></tr>" + PMD.EOL + 43 "</table><br></center></body></html>"; 44 } 45 46 public String getExpectedError(ProcessingError error) { 47 return "<html><head><title>PMD</title></head><style type=\"text/css\"><!--" + PMD.EOL + 48 "body { background-color: white; font-family:verdana, arial, helvetica, geneva; font-size: 16px; font-style: italic; color: black; }" + PMD.EOL + 49 ".title { font-family: verdana, arial, helvetica,geneva; font-size: 12px; font-weight:bold; color: white; }" + PMD.EOL + 50 ".body { font-family: verdana, arial, helvetica, geneva; font-size: 12px; font-weight:plain; color: black; }" + PMD.EOL + 51 "#TableHeader { background-color: #003366; }" + PMD.EOL + 52 "#RowColor1 { background-color: #eeeeee; }" + PMD.EOL + 53 "#RowColor2 { background-color: white; }" + PMD.EOL + 54 "--></style><body><center><br><table border=\"0\" width=\"80%\"><tr id=TableHeader><td><font class=title> Problems found</font></td></tr><tr id=RowColor2><td><font class=body>" + error +"\"</font></td></tr></table></center></body></html>"; 55 } 56 57 } 58 | Popular Tags |