View Javadoc
1   package org.dbunit.database.search;
2   
3   import java.sql.SQLException;
4   
5   import org.dbunit.database.AbstractImportedKeysFilteredByPKsTestCase;
6   import org.dbunit.dataset.DataSetException;
7   
8   import org.dbunit.util.search.SearchException;
9   
10  public class ImportedKeysFilteredByPKsTest extends AbstractImportedKeysFilteredByPKsTestCase {
11  
12    public ImportedKeysFilteredByPKsTest(String testName) {
13      super(testName, "hypersonic_dataset.sql");
14    }
15    protected int[] setupTablesSizeFixture() {
16      int[] sizes = new int[] { 2, 8, 4, 2, 4, 2, 2, 2 };
17      return sizes;
18    }
19       
20    public void testAWithOne() throws DataSetException, SQLException, SearchException {
21      addInput( A, new String[] { A1 } );
22      addOutput( A, new String[] { A1 } );
23      addOutput( D, new String[] { D1 } );
24      doIt();      
25    }
26  
27    public void testHWithOne() throws DataSetException, SQLException, SearchException {
28      addInput( H, new String[] { H1 } );
29      addOutput( H, new String[] { H1 } );
30      doIt();      
31    }
32  
33    public void testBWithOne() throws DataSetException, SQLException, SearchException {
34      addInput( B, new String[] { B1 } );
35      addOutput( B, new String[] { B1 } );
36      addOutput( C, new String[] { C1 } );
37      addOutput( E, new String[] { E1 } );
38      addOutput( G, new String[] { G1 } );
39      addOutput( A, new String[] { A1 } );
40      addOutput( F, new String[] { F1 } );
41      addOutput( D, new String[] { D1 } );    
42      addOutput( H, new String[] { H1 } );
43      doIt();      
44    }
45  
46  }