View Javadoc
1 package test.net.sourceforge.pmd; 2 3 import junit.framework.TestCase; 4 import net.sourceforge.pmd.Report; 5 import net.sourceforge.pmd.RuleContext; 6 7 public class RuleContextTest extends TestCase { 8 9 public void testReport() { 10 RuleContext ctx = new RuleContext(); 11 assertNull("Report should be null", ctx.getReport()); 12 Report r = new Report(); 13 ctx.setReport(r); 14 Report r2 = ctx.getReport(); 15 assertEquals("report object mismatch", r, r2); 16 } 17 18 public void testFilename() { 19 RuleContext ctx = new RuleContext(); 20 assertNull("filename should be null", ctx.getSourceCodeFilename()); 21 ctx.setSourceCodeFilename("foo"); 22 assertEquals("filename mismatch", "foo", ctx.getSourceCodeFilename()); 23 } 24 }

This page was automatically generated by Maven