diff --git a/core/src/test/groovy/com/predic8/schema/SchemaVersionTest.groovy b/core/src/test/groovy/com/predic8/schema/SchemaVersionTest.groovy new file mode 100644 index 00000000..88110eab --- /dev/null +++ b/core/src/test/groovy/com/predic8/schema/SchemaVersionTest.groovy @@ -0,0 +1,18 @@ +package com.predic8.schema; + +import com.predic8.xml.util.ClasspathResolver; + +public class SchemaVersionTest extends GroovyTestCase { + def schema + + void setUp() { + def parser = new SchemaParser(resourceResolver: new ClasspathResolver()) + schema = parser.parse("/schema/version/schema-version.xsd") + } + + void testSchemaVersion() { + def expected = "1.0" + def version = schema.version + assertEquals( expected, version ) + } +} diff --git a/core/src/test/resources/schema/version/schema-version.xsd b/core/src/test/resources/schema/version/schema-version.xsd new file mode 100644 index 00000000..1ccbf40d --- /dev/null +++ b/core/src/test/resources/schema/version/schema-version.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +