FileDocCategorySizeDatePackage
SchemaValidateTest.javaAPI DocApache Ant 1.703105Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.taskdefs.optional

SchemaValidateTest

public class SchemaValidateTest extends org.apache.tools.ant.BuildFileTest
Test schema validation

Fields Summary
private static final String
TASKDEFS_DIR
where tasks run
Constructors Summary
public SchemaValidateTest(String name)
Constructor

param
name testname


             
       
        super(name);
    
Methods Summary
public voidsetUp()
The JUnit setup method

        configureProject(TASKDEFS_DIR + "schemavalidate.xml");
    
public voidtestEqualsSchemasOK()

        executeTarget("testEqualsSchemasOK");
    
public voidtestFileset()

        executeTarget("testFileset");
    
public voidtestNSMapping()
add namespace awareness.

        executeTarget("testNSMapping");
    
public voidtestNoDoubleSchemaLocation()

        expectBuildExceptionContaining("testNoDoubleSchemaLocation",
                "two locations for schemas",
                SchemaValidate.SchemaLocation.ERROR_TWO_LOCATIONS);
    
public voidtestNoDuplicateSchema()

        expectBuildExceptionContaining("testNoDuplicateSchema",
                "duplicate schemas with different values",
                SchemaValidate.ERROR_DUPLICATE_SCHEMA);
    
public voidtestNoEmptySchemaLocation()

        expectBuildExceptionContaining("testNoEmptySchemaLocation",
                "empty schema location",
                SchemaValidate.SchemaLocation.ERROR_NO_LOCATION);
    
public voidtestNoEmptySchemaNamespace()

        expectBuildExceptionContaining("testNoEmptySchemaNamespace",
                "empty namespace URI",SchemaValidate.SchemaLocation.ERROR_NO_URI);
    
public voidtestNoFile()

        expectBuildExceptionContaining("testNoFile",
                "no file at file attribute",
                SchemaValidate.SchemaLocation.ERROR_NO_FILE);
    
public voidtestNoNamespace()
test with no namespace

        executeTarget("testNoNamespace");