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 SchemaValidatorTest extends CLITestCase {
9 protected SchemaValidatorTest(String test) {
10 super(test);
11 }
12
13 public void testSchemaWithoutErrors() throws Exception {
14 assertOutput(
15 new File("src/test/resources/output/cli/golden-schema-validator.out"),
16 run("src/test/resources/projects/schema-validator.xhp"));
17 }
18
19 public void testSchemaWithErrors() throws Exception {
20 assertOutput(
21 new File("src/test/resources/output/cli/golden-schema-invalid-validator.out"),
22 run("src/test/resources/projects/schema-invalid-validator.xhp"));
23 }
24
25 public static Test suite() {
26 TestSuite suite = new TestSuite("Schema Validator Command Line Test");
27
28 suite.addTest(new SchemaValidatorTest("testSchemaWithErrors"));
29 suite.addTest(new SchemaValidatorTest("testSchemaWithoutErrors"));
30
31 return suite;
32 }
33 }