use of org.dbflute.bhv.core.BehaviorCommand in project dbflute-core by dbflute.
the class TnStatementFactoryImplTest method test_getActualStatementConfig_cursorSelectFetchSize_cursor_suppressDefault.
public void test_getActualStatementConfig_cursorSelectFetchSize_cursor_suppressDefault() throws Exception {
// ## Arrange ##
TnStatementFactoryImpl impl = new TnStatementFactoryImpl() {
@Override
protected boolean isSelectCursorFetchSizeCommand(BehaviorCommand<?> command) {
return true;
}
};
{
StatementConfig defaultConfig = new StatementConfig();
defaultConfig.queryTimeout(10).fetchSize(20).maxRows(30);
impl.setDefaultStatementConfig(defaultConfig);
}
impl.setCursorSelectFetchSize(200);
StatementConfig config = new StatementConfig();
config.suppressDefault();
config.queryTimeout(1);
// ## Act ##
StatementConfig actual = impl.getActualStatementConfig(config);
// ## Assert ##
assertNotNull(actual);
assertEquals(1, actual.getQueryTimeout());
assertEquals(null, actual.getFetchSize());
assertEquals(null, actual.getMaxRows());
}
Aggregations