@Test public void testValidateUsingQuery() { presenter._setDataSetDef( dataSetDef ); presenter.editor = sqlDataSetDefAttributesEditor; when( sqlDataSetDefAttributesEditor.isUsingQuery() ).thenReturn( true ); presenter.validate(); verify( sqlDataSetDefValidator, times( 1 ) ).validateCustomAttributes( any( SQLDataSetDef.class ), eq( true ) ); verify( sqlDataSetDefValidator, times( 0 ) ).validate( any( SQLDataSetDef.class ), anyBoolean(), anyBoolean(), anyBoolean() ); }
@Override protected Iterable<ConstraintViolation<?>> validate() { return validatorProvider.validateAttributes( getDataSetDef(), editor.isUsingQuery() ); }
SQLDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<SQLDataSetDef, SQLDataSetDefAttributesEditor> { @Override protected Iterable<ConstraintViolation<?>> validate() { return validatorProvider.validateAttributes( getDataSetDef(), editor.isUsingQuery() ); } }
SQLDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<SQLDataSetDef, SQLDataSetDefAttributesEditor> { @Override protected Iterable<ConstraintViolation<?>> validate() { return validatorProvider.validateAttributes( getDataSetDef(), editor.isUsingQuery() ); } @Inject  SQLDataSetBasicAttributesWorkflow( final DataSetClientServices clientServices,
                                              final DataSetValidatorProvider validatorProvider,
                                              final SyncBeanManager beanManager,
                                              final DataSetDefBasicAttributesEditor basicAttributesEditor,
                                              final Event<SaveRequestEvent> saveRequestEvent,
                                              final Event<TestDataSetRequestEvent> testDataSetEvent,
                                              final Event<CancelRequestEvent> cancelRequestEvent,
                                              final View view ); }
SQLDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<SQLDataSetDef, SQLDataSetDefAttributesEditor> { @Override protected Iterable<ConstraintViolation<?>> validate() { return validatorProvider.validateAttributes( getDataSetDef(), editor.isUsingQuery() ); } @Inject  SQLDataSetBasicAttributesWorkflow( final DataSetClientServices clientServices,
                                              final DataSetValidatorProvider validatorProvider,
                                              final SyncBeanManager beanManager,
                                              final DataSetDefBasicAttributesEditor basicAttributesEditor,
                                              final Event<SaveRequestEvent> saveRequestEvent,
                                              final Event<TestDataSetRequestEvent> testDataSetEvent,
                                              final Event<CancelRequestEvent> cancelRequestEvent,
                                              final View view );  }
SQLDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<SQLDataSetDef, SQLDataSetDefAttributesEditor> { @Override protected Iterable<ConstraintViolation<?>> validate() { return validatorProvider.validateAttributes( getDataSetDef(), editor.isUsingQuery() ); } @Inject  SQLDataSetBasicAttributesWorkflow( final DataSetClientServices clientServices,
                                              final DataSetValidatorProvider validatorProvider,
                                              final SyncBeanManager beanManager,
                                              final DataSetDefBasicAttributesEditor basicAttributesEditor,
                                              final Event<SaveRequestEvent> saveRequestEvent,
                                              final Event<TestDataSetRequestEvent> testDataSetEvent,
                                              final Event<CancelRequestEvent> cancelRequestEvent,
                                              final View view );   }