@ -50,19 +50,19 @@ public class BasicTableDataUtilsTest extends TestCase {
TableDataSource source = EasyMock . mock ( TableDataSource . class ) ;
TableData tableData = EasyMock . mock ( TableData . class ) ;
EasyMock . expect ( source . getTableData ( "ds1" ) ) . andReturn ( tableData ) . anyTimes ( ) ;
EasyMock . expect ( source . getTableData ( "test- ds1" ) ) . andReturn ( tableData ) . anyTimes ( ) ;
EasyMock . expect ( source . getTableData ( "test- ds11" ) ) . andReturn ( null ) . anyTimes ( ) ;
EasyMock . expect ( source . getTableData ( "test_ ds1" ) ) . andReturn ( tableData ) . anyTimes ( ) ;
EasyMock . expect ( source . getTableData ( "test_ ds11" ) ) . andReturn ( null ) . anyTimes ( ) ;
EasyMock . replay ( source , tableData ) ;
Assert . assertEquals ( "test- ds1" , BasicTableDataUtils . getTableDataName ( true , source , "ds1" , "test" , false ) ) ;
Assert . assertEquals ( "test- ds11" , BasicTableDataUtils . getTableDataName ( false , source , "ds1" , "test" , false ) ) ;
Assert . assertEquals ( "test_ ds1" , BasicTableDataUtils . getTableDataName ( true , source , "ds1" , "test" , false ) ) ;
Assert . assertEquals ( "test_ ds11" , BasicTableDataUtils . getTableDataName ( false , source , "ds1" , "test" , false ) ) ;
source = EasyMock . mock ( TableDataSource . class ) ;
EasyMock . expect ( source . getTableData ( "ds1" ) ) . andReturn ( null ) . anyTimes ( ) ;
EasyMock . expect ( source . getTableData ( "test- ds1" ) ) . andReturn ( null ) . anyTimes ( ) ;
EasyMock . expect ( source . getTableData ( "test_ ds1" ) ) . andReturn ( null ) . anyTimes ( ) ;
EasyMock . replay ( source ) ;
Assert . assertEquals ( "test- ds1" , BasicTableDataUtils . getTableDataName ( true , source , "ds1" , "test" , false ) ) ;
Assert . assertEquals ( "test_ ds1" , BasicTableDataUtils . getTableDataName ( true , source , "ds1" , "test" , false ) ) ;
Assert . assertEquals ( "ds1" , BasicTableDataUtils . getTableDataName ( false , source , "ds1" , "test" , false ) ) ;
Assert . assertEquals ( "test- ds1" , BasicTableDataUtils . getTableDataName ( false , source , "ds1" , "test" , true ) ) ;
Assert . assertEquals ( "test_ ds1" , BasicTableDataUtils . getTableDataName ( false , source , "ds1" , "test" , true ) ) ;
}