Splitted test

This commit is contained in:
Luca Frosini 2020-01-24 16:54:44 +01:00
parent 5d9da98508
commit 96439e829e
1 changed files with 52 additions and 14 deletions

View File

@ -112,7 +112,57 @@ public class SchemaManagementImplTest {
} }
@Test @Test
public void getList() throws Exception { public void getResourceTypes() throws Exception {
logger.debug("\n\n\n");
boolean includeSubTypes = true;
SchemaManagement schemaManagement = new SchemaManagementImpl();
String list = schemaManagement.read(Resource.NAME, includeSubTypes);
logger.info("{} list : {}", Resource.NAME, list);
}
@Test
public void getFacetTypes() throws Exception {
logger.debug("\n\n\n");
boolean includeSubTypes = true;
SchemaManagement schemaManagement = new SchemaManagementImpl();
String list = schemaManagement.read(Facet.NAME, includeSubTypes);
logger.info("{} list : {}", Facet.NAME, list);
}
@Test
public void getConsistsOfTypes() throws Exception {
logger.debug("\n\n\n");
boolean includeSubTypes = true;
SchemaManagement schemaManagement = new SchemaManagementImpl();
String list = schemaManagement.read(ConsistsOf.NAME, includeSubTypes);
logger.info("{} list : {}", ConsistsOf.NAME, list);
}
@Test
public void getIsRelatedToTypes() throws Exception {
logger.debug("\n\n\n");
boolean includeSubTypes = true;
SchemaManagement schemaManagement = new SchemaManagementImpl();
String list = schemaManagement.read(IsRelatedTo.NAME, includeSubTypes);
logger.info("{} list : {}", IsRelatedTo.NAME, list);
}
@Test
public void getInvalidTypeDefinition() throws Exception {
logger.debug("\n\n\n"); logger.debug("\n\n\n");
boolean includeSubTypes = true; boolean includeSubTypes = true;
@ -132,12 +182,6 @@ public class SchemaManagementImplTest {
} }
String list = schemaManagement.read(Resource.NAME, includeSubTypes);
logger.info("{} list : {}", Resource.NAME, list);
list = schemaManagement.read(Facet.NAME, includeSubTypes);
logger.info("{} list : {}", Facet.NAME, list);
try { try {
schemaManagement.read(Relation.NAME, includeSubTypes); schemaManagement.read(Relation.NAME, includeSubTypes);
throw new Exception("Should not be allowed to get " + Relation.NAME + " schema"); throw new Exception("Should not be allowed to get " + Relation.NAME + " schema");
@ -145,12 +189,6 @@ public class SchemaManagementImplTest {
} }
list = schemaManagement.read(ConsistsOf.NAME, includeSubTypes);
logger.info("{} list : {}", ConsistsOf.NAME, list);
list = schemaManagement.read(IsRelatedTo.NAME, includeSubTypes);
logger.info("{} list : {}", IsRelatedTo.NAME, list);
} }
@Test(expected=SchemaAlreadyPresentException.class) @Test(expected=SchemaAlreadyPresentException.class)