1 21 package org.dbunit.dataset; 22 23 import java.util.ArrayList ; 24 import java.util.List ; 25 26 31 public class DefaultTableIteratorTest 32 extends AbstractTableIteratorTest 33 { 34 public DefaultTableIteratorTest(String s) 35 { 36 super(s); 37 } 38 39 protected ITableIterator getIterator() throws Exception 40 { 41 return getIterator(false); 42 } 43 44 protected ITableIterator getEmptyIterator() 45 { 46 return new DefaultTableIterator(new ITable[0]); 47 } 48 49 protected ITableIterator getIterator(boolean reversed) throws Exception 50 { 51 List tableList = new ArrayList (); 52 String [] names = super.getExpectedNames(); 53 for (int i = 0; i < names.length; i++) 54 { 55 String name = names[i]; 56 tableList.add(new DefaultTable(name)); 57 } 58 59 ITable[] tables = (ITable[])tableList.toArray(new ITable[0]); 60 return new DefaultTableIterator(tables, reversed); 61 } 62 63 } 64 | Popular Tags |