@Test public void testValidateUsingFileUrl() { presenter._setDataSetDef( dataSetDef ); presenter.editor = csvDataSetDefAttributesEditor; when( csvDataSetDefAttributesEditor.isUsingFilePath() ).thenReturn( false ); presenter.validate(); verify( csvDataSetDefValidator, times( 1 ) ).validateCustomAttributes( dataSetDef, false ); verify( csvDataSetDefValidator, times( 0 ) ).validate( any( CSVDataSetDef.class ), anyBoolean(), anyBoolean(), anyBoolean() ); }
@Override protected Iterable<ConstraintViolation<?>> validate() { return validatorProvider.validateAttributes( getDataSetDef(), editor.isUsingFilePath() ); }
CSVDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<CSVDataSetDef, CSVDataSetDefAttributesEditor> { @Override protected Iterable<ConstraintViolation<?>> validate() { return validatorProvider.validateAttributes( getDataSetDef(), editor.isUsingFilePath() ); } }
CSVDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<CSVDataSetDef, CSVDataSetDefAttributesEditor> { @Override protected Iterable<ConstraintViolation<?>> validate() { return validatorProvider.validateAttributes( getDataSetDef(), editor.isUsingFilePath() ); } @Inject  CSVDataSetBasicAttributesWorkflow( 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 ); }
CSVDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<CSVDataSetDef, CSVDataSetDefAttributesEditor> { @Override protected Iterable<ConstraintViolation<?>> validate() { return validatorProvider.validateAttributes( getDataSetDef(), editor.isUsingFilePath() ); } @Inject  CSVDataSetBasicAttributesWorkflow( 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 );  }
CSVDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<CSVDataSetDef, CSVDataSetDefAttributesEditor> { @Override protected Iterable<ConstraintViolation<?>> validate() { return validatorProvider.validateAttributes( getDataSetDef(), editor.isUsingFilePath() ); } @Inject  CSVDataSetBasicAttributesWorkflow( 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 );   }