Schema { public SchemaVersion getVersion() { return version; }  static Schema build(String path); void save(OutputStream os); Collection<Type> getTypes(); Collection<UserType> getUserTypes(); Type findType(String idOrName); SchemaVersion getVersion(); Collection<Type> getDerivedTypes(String baseTypeId,
			boolean directOnly); Collection<Type> getDerivedTypes(Type baseType,
			boolean directOnly); static final String TYPE_ID_TOKENIZER_PATTERN; }
@Test public void schemaHashTest() throws Exception { Schema schema = parseSchema("src/test/resources/schemahash1.tml"); Schema schema2 = parseSchema("src/test/resources/schemahash2.tml"); assertNotSame(schema.getVersion().getSchemaHash(), schema2 .getVersion().getSchemaHash()); }
@Test public void schemaSmokeTest() throws URISyntaxException, TeslaSchemaException, NoSuchAlgorithmException, SAXException, IOException, ParserConfigurationException { Schema schema = parseSchema("src/test/resources/smoke.tml"); assertNotNull(schema); assertTrue(schema.getVersion().getVersionNumber() == 0); }
@Test public void schemaVersionNameTest() throws URISyntaxException, TeslaSchemaException, NoSuchAlgorithmException, SAXException, IOException, ParserConfigurationException { Schema schema = parseSchema("src/test/resources/versionname.tml"); assertNotNull(schema); assertTrue(schema.getVersion().getName() .contains("#versionname#")); }
@Test public void schemaVersionNumberTest() throws URISyntaxException, TeslaSchemaException, NoSuchAlgorithmException, SAXException, IOException, ParserConfigurationException { Schema schema = parseSchema("src/test/resources/versionnumber.tml"); assertNotNull(schema); assertTrue(schema.getVersion().getVersionNumber() > 1); }