@Test public void testIsValidWhenItIsTrue() { final DataType dataType = mock(DataType.class); doReturn(true).when(dataTypeNameValidator).isValid(dataType); assertTrue(recordEngine.isValid(dataType)); }
@Override public boolean isValid(final DataType dataType) { return dataTypeNameValidator.isValid(dataType); }
ItemDefinitionRecordEngine implements DataTypeRecordEngine { @Override public boolean isValid(final DataType dataType) { return dataTypeNameValidator.isValid(dataType); } }
ItemDefinitionRecordEngine implements DataTypeRecordEngine { @Override public boolean isValid(final DataType dataType) { return dataTypeNameValidator.isValid(dataType); } @Inject  ItemDefinitionRecordEngine(final ItemDefinitionStore itemDefinitionStore,
                                      final ItemDefinitionDestroyHandler itemDefinitionDestroyHandler,
                                      final ItemDefinitionUpdateHandler itemDefinitionUpdateHandler,
                                      final ItemDefinitionCreateHandler itemDefinitionCreateHandler,
                                      final DataTypeDestroyHandler dataTypeDestroyHandler,
                                      final DataTypeUpdateHandler dataTypeUpdateHandler,
                                      final DataTypeCreateHandler dataTypeCreateHandler,
                                      final DataTypeNameValidator dataTypeNameValidator); }
ItemDefinitionRecordEngine implements DataTypeRecordEngine { @Override public boolean isValid(final DataType dataType) { return dataTypeNameValidator.isValid(dataType); } @Inject  ItemDefinitionRecordEngine(final ItemDefinitionStore itemDefinitionStore,
                                      final ItemDefinitionDestroyHandler itemDefinitionDestroyHandler,
                                      final ItemDefinitionUpdateHandler itemDefinitionUpdateHandler,
                                      final ItemDefinitionCreateHandler itemDefinitionCreateHandler,
                                      final DataTypeDestroyHandler dataTypeDestroyHandler,
                                      final DataTypeUpdateHandler dataTypeUpdateHandler,
                                      final DataTypeCreateHandler dataTypeCreateHandler,
                                      final DataTypeNameValidator dataTypeNameValidator); @PostConstruct void init(); @Override List<DataType> update(final DataType dataType); @Override List<DataType> destroy(final DataType dataType); @Override List<DataType> destroyWithoutDependentTypes(final DataType dataType); @Override List<DataType> create(final DataType dataType); @Override List<DataType> create(final DataType record,
                                 final DataType reference,
                                 final CreationType creationType); @Override boolean isValid(final DataType dataType); void doUpdate(final DataType dataType,
                         final ItemDefinition itemDefinition); void doDestroy(final DataType dataType); }
ItemDefinitionRecordEngine implements DataTypeRecordEngine { @Override public boolean isValid(final DataType dataType) { return dataTypeNameValidator.isValid(dataType); } @Inject  ItemDefinitionRecordEngine(final ItemDefinitionStore itemDefinitionStore,
                                      final ItemDefinitionDestroyHandler itemDefinitionDestroyHandler,
                                      final ItemDefinitionUpdateHandler itemDefinitionUpdateHandler,
                                      final ItemDefinitionCreateHandler itemDefinitionCreateHandler,
                                      final DataTypeDestroyHandler dataTypeDestroyHandler,
                                      final DataTypeUpdateHandler dataTypeUpdateHandler,
                                      final DataTypeCreateHandler dataTypeCreateHandler,
                                      final DataTypeNameValidator dataTypeNameValidator); @PostConstruct void init(); @Override List<DataType> update(final DataType dataType); @Override List<DataType> destroy(final DataType dataType); @Override List<DataType> destroyWithoutDependentTypes(final DataType dataType); @Override List<DataType> create(final DataType dataType); @Override List<DataType> create(final DataType record,
                                 final DataType reference,
                                 final CreationType creationType); @Override boolean isValid(final DataType dataType); void doUpdate(final DataType dataType,
                         final ItemDefinition itemDefinition); void doDestroy(final DataType dataType);  }