1 package net.sourceforge.pmd.renderers;
2
3 import net.sourceforge.pmd.PMD;
4 import net.sourceforge.pmd.Report.ProcessingError;
5
6 public class VBHTMLRendererTest extends AbstractRendererTst {
7
8 @Override
9 public Renderer getRenderer() {
10 return new VBHTMLRenderer();
11 }
12
13 @Override
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>" + PMD.EOL;
25 }
26
27 @Override
28 public String getExpectedEmpty() {
29 return "<html><head><title>PMD</title></head><style type=\"text/css\"><!--" + PMD.EOL +
30 "body { background-color: white; font-family:verdana, arial, helvetica, geneva; font-size: 16px; font-style: italic; color: black; }" + PMD.EOL +
31 ".title { font-family: verdana, arial, helvetica,geneva; font-size: 12px; font-weight:bold; color: white; }" + PMD.EOL +
32 ".body { font-family: verdana, arial, helvetica, geneva; font-size: 12px; font-weight:plain; color: black; }" + PMD.EOL +
33 "#TableHeader { background-color: #003366; }" + PMD.EOL +
34 "#RowColor1 { background-color: #eeeeee; }" + PMD.EOL +
35 "#RowColor2 { background-color: white; }" + PMD.EOL +
36 "--></style><body><center><br></center></body></html>" + PMD.EOL;
37 }
38
39 @Override
40 public String getExpectedMultiple() {
41 return "<html><head><title>PMD</title></head><style type=\"text/css\"><!--" + PMD.EOL +
42 "body { background-color: white; font-family:verdana, arial, helvetica, geneva; font-size: 16px; font-style: italic; color: black; }" + PMD.EOL +
43 ".title { font-family: verdana, arial, helvetica,geneva; font-size: 12px; font-weight:bold; color: white; }" + PMD.EOL +
44 ".body { font-family: verdana, arial, helvetica, geneva; font-size: 12px; font-weight:plain; color: black; }" + PMD.EOL +
45 "#TableHeader { background-color: #003366; }" + PMD.EOL +
46 "#RowColor1 { background-color: #eeeeee; }" + PMD.EOL +
47 "#RowColor2 { background-color: white; }" + PMD.EOL +
48 "--></style><body><center><table border=\"0\" width=\"80%\"><tr id=TableHeader><td colspan=\"2\"><font class=title> n/a</font></tr>" + PMD.EOL +
49 "<tr id=RowColor2><td width=\"50\" align=\"right\"><font class=body>1 </font></td><td><font class=body>msg</font></td></tr>" + PMD.EOL +
50 "<tr id=RowColor1><td width=\"50\" align=\"right\"><font class=body>1 </font></td><td><font class=body>msg</font></td></tr>" + PMD.EOL +
51 "</table><br></center></body></html>" + PMD.EOL;
52 }
53
54 @Override
55 public String getExpectedError(ProcessingError error) {
56 return "<html><head><title>PMD</title></head><style type=\"text/css\"><!--" + PMD.EOL +
57 "body { background-color: white; font-family:verdana, arial, helvetica, geneva; font-size: 16px; font-style: italic; color: black; }" + PMD.EOL +
58 ".title { font-family: verdana, arial, helvetica,geneva; font-size: 12px; font-weight:bold; color: white; }" + PMD.EOL +
59 ".body { font-family: verdana, arial, helvetica, geneva; font-size: 12px; font-weight:plain; color: black; }" + PMD.EOL +
60 "#TableHeader { background-color: #003366; }" + PMD.EOL +
61 "#RowColor1 { background-color: #eeeeee; }" + PMD.EOL +
62 "#RowColor2 { background-color: white; }" + PMD.EOL +
63 "--></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>" + PMD.EOL;
64 }
65
66 public static junit.framework.Test suite() {
67 return new junit.framework.JUnit4TestAdapter(VBHTMLRendererTest.class);
68 }
69 }