@Test(expected = LookupReferencedException.class) public void shouldValidateEntityLookupFieldRemoval() { setupDataSource(); setupEntity(); setupDraftEntityForFieldRemoval(); entityValidator.validateEntity(draft); }
public void validateEntity(EntityDraft draft) { validateEntityLookupsReferences(draft); validateEntityLookupsFieldsReferences(draft); validateEntityComboboxFieldsSelectionTypesChanges(draft); validateEntityComboboxesValues(draft); }
EntityValidator { public void validateEntity(EntityDraft draft) { validateEntityLookupsReferences(draft); validateEntityLookupsFieldsReferences(draft); validateEntityComboboxFieldsSelectionTypesChanges(draft); validateEntityComboboxesValues(draft); } }
EntityValidator { public void validateEntity(EntityDraft draft) { validateEntityLookupsReferences(draft); validateEntityLookupsFieldsReferences(draft); validateEntityComboboxFieldsSelectionTypesChanges(draft); validateEntityComboboxesValues(draft); }  }
EntityValidator { public void validateEntity(EntityDraft draft) { validateEntityLookupsReferences(draft); validateEntityLookupsFieldsReferences(draft); validateEntityComboboxFieldsSelectionTypesChanges(draft); validateEntityComboboxesValues(draft); }  void validateEntity(EntityDraft draft); void validateAdvancedSettingsEdit(Entity entity, String path); void validateFieldNotUsedByLookups(Entity entity, Long fieldId); @Autowired void setPersistenceManagerFactory(PersistenceManagerFactory persistenceManagerFactory); @Autowired void setBundleContext(BundleContext bundleContext); }
EntityValidator { public void validateEntity(EntityDraft draft) { validateEntityLookupsReferences(draft); validateEntityLookupsFieldsReferences(draft); validateEntityComboboxFieldsSelectionTypesChanges(draft); validateEntityComboboxesValues(draft); }  void validateEntity(EntityDraft draft); void validateAdvancedSettingsEdit(Entity entity, String path); void validateFieldNotUsedByLookups(Entity entity, Long fieldId); @Autowired void setPersistenceManagerFactory(PersistenceManagerFactory persistenceManagerFactory); @Autowired void setBundleContext(BundleContext bundleContext);  }