use of au.gov.asd.tac.constellation.graph.schema.SchemaFactory in project constellation by constellation-app.
the class VisualConceptNGTest method testVisualAttributesRegistered.
/**
* Test whether all the attributes of VisualConcept are registered in the Visual Schema
*/
@Test
public void testVisualAttributesRegistered() {
System.out.println("visualAttributesRegistered");
final SchemaFactory schemaFactory = SchemaFactoryUtilities.getSchemaFactory(VisualSchemaFactory.VISUAL_SCHEMA_ID);
final List<SchemaAttribute> registeredAttributes = new ArrayList<>();
for (final Map<String, SchemaAttribute> graphElementAttributes : schemaFactory.getRegisteredAttributes().values()) {
registeredAttributes.addAll(graphElementAttributes.values());
}
final VisualConcept instance = new VisualConcept();
final Collection<SchemaAttribute> visualAttributes = instance.getSchemaAttributes();
for (final SchemaAttribute visualAttribute : visualAttributes) {
assertTrue(registeredAttributes.contains(visualAttribute));
}
}
Aggregations