Ejemplo n.º 1
0
  @Test(
      groups = {"wso2.greg.api"},
      description = "Testing removeSchema API method",
      priority = 12)
  public void testRemoveSchema() throws GovernanceException {
    try {
      schemaManager.removeSchema(schemaObj.getId());
      schemaArray = schemaManager.getAllSchemas();
      for (Schema s : schemaArray) {
        assertFalse(
            s.getId().equalsIgnoreCase(schemaObj.getId()),
            "SchemaManager:removeSchema" + " API method having error");
      }

    } catch (GovernanceException e) {
      throw new GovernanceException(
          "Error occurred while executing SchemaManager:removeSchema method" + e);
    }
  }
Ejemplo n.º 2
0
 private void cleanSchema() throws GovernanceException {
   Schema[] schemas = schemaManager.getAllSchemas();
   for (Schema s : schemas) {
     schemaManager.removeSchema(s.getId());
   }
 }