use of org.qi4j.api.association.AbstractAssociation in project qi4j-sdk by Qi4j.
the class Qi4jSPITest method validateState.
private void validateState(AssociationStateHolder state, EntityDescriptor entityDescriptor) {
for (PropertyDescriptor propertyDescriptor : entityDescriptor.state().properties()) {
Property<?> prop = state.propertyFor(propertyDescriptor.accessor());
assertThat("Properties could be listed", prop, CoreMatchers.notNullValue());
}
AssociationStateDescriptor descriptor = entityDescriptor.state();
for (AssociationDescriptor associationDescriptor : descriptor.associations()) {
AbstractAssociation assoc = state.associationFor(associationDescriptor.accessor());
assertThat("Assocs could be listed", assoc, CoreMatchers.notNullValue());
}
}
Aggregations