View Javadoc

1   package org.xmlhammer.cli;
2   
3   import java.io.File;
4   
5   import junit.framework.Test;
6   import junit.framework.TestSuite;
7   
8   public class StylesheetValidatorTest extends CLITestCase {
9       protected StylesheetValidatorTest(String test) {
10          super(test);
11      }
12  
13      public void testStylesheetWithErrors() throws Exception {
14          assertOutput(
15                  new File("src/test/resources/output/cli/golden-stylesheet-validator-errors.out"), 
16                  run("src/test/resources/projects/stylesheetvalidator/stylesheet-invalid.xhp"));
17      }
18      
19      public void testStylesheetWithoutErrors() throws Exception {
20          assertOutput(
21                  new File("src/test/resources/output/cli/golden-stylesheet-validator.out"), 
22                  run("src/test/resources/projects/stylesheetvalidator/stylesheet-valid.xhp"));
23      }
24  
25      public static Test suite() {
26          TestSuite suite = new TestSuite("Stylesheet Validator Command Line Test");
27          
28          suite.addTest(new StylesheetValidatorTest("testStylesheetWithErrors"));
29          suite.addTest(new StylesheetValidatorTest("testStylesheetWithoutErrors"));
30  
31          return suite;
32      }
33  }