@Test public void testFlushDriverUsingFilePath() throws Exception { presenter._setDataSetDef( dataSetDef ); presenter.editor = csvDataSetDefAttributesEditor; when( csvDataSetDefAttributesEditor.isUsingFilePath() ).thenReturn( true ); presenter.afterFlush(); verify( dataSetDef, times( 1 ) ).setFileURL( null ); verify( dataSetDef, times( 0 ) ).setFilePath( null ); }
@Override protected void afterFlush() { super.afterFlush(); if ( !editor.isUsingFilePath() ) { dataSetDef.setFilePath( null ); } else { dataSetDef.setFileURL( null ); } }
CSVDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<CSVDataSetDef, CSVDataSetDefAttributesEditor> { @Override protected void afterFlush() { super.afterFlush(); if ( !editor.isUsingFilePath() ) { dataSetDef.setFilePath( null ); } else { dataSetDef.setFileURL( null ); } } }
CSVDataSetBasicAttributesWorkflow extends DataSetBasicAttributesWorkflow<CSVDataSetDef, CSVDataSetDefAttributesEditor> { @Override protected void afterFlush() { super.afterFlush(); if ( !editor.isUsingFilePath() ) { dataSetDef.setFilePath( null ); } else { dataSetDef.setFileURL( null ); } } @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 void afterFlush() { super.afterFlush(); if ( !editor.isUsingFilePath() ) { dataSetDef.setFilePath( null ); } else { dataSetDef.setFileURL( null ); } } @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 void afterFlush() { super.afterFlush(); if ( !editor.isUsingFilePath() ) { dataSetDef.setFilePath( null ); } else { dataSetDef.setFileURL( null ); } } @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 );   }