/** * @throws Exception */ @Test public void testGetSchemaDescriptionDocumentById() throws Exception { SchemaDescriptionDocument doc = getWebscriptRegistry().getSchemaDescriptionDocument("samples.sample1"); assertNotNull(doc); }
/** * @throws Exception */ @Test public void testSchemaDescriptionDocumentNameDescription() throws Exception { SchemaDescriptionDocument doc = getWebscriptRegistry().getSchemaDescriptionDocument("samples.sample1"); assertNotNull(doc); String shortName = doc.getShortName(); assertEquals("Schema for sample1",shortName); String description = doc.getDescription(); assertEquals("Schema for sample1 in package samples",description); }
/** * @throws Exception */ @Test public void testSchemaDescriptionDocumentTypes() throws Exception { SchemaDescriptionDocument doc = getWebscriptRegistry().getSchemaDescriptionDocument("samples.sample1"); assertNotNull(doc); TypeDescription[] types = doc.getTypeDescriptions(); assertNotNull(types); assertEquals(2,types.length); TypeDescription type = types[0]; assertEquals("samples.sample1.status",type.getId()); assertEquals("json",type.getFormat()); assertEquals("status",type.getShortName()); assertEquals("Sample Status",type.getDescription()); assertNotNull(type.getDefinition()); assertTrue(type.getDefinition().trim().length()>0); }