⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 importedkeysfilteredbypkscyclictest.java

📁 采用 Java 编写的数据库系统单元测试程序。
💻 JAVA
字号:
package org.dbunit.database.search;

import java.sql.SQLException;

import org.dbunit.database.AbstractImportedKeysFilteredByPKsTestCase;
import org.dbunit.dataset.DataSetException;
import org.dbunit.util.search.SearchException;


public class ImportedKeysFilteredByPKsCyclicTest extends AbstractImportedKeysFilteredByPKsTestCase {

  public ImportedKeysFilteredByPKsCyclicTest(String testName) {
    super(testName, "hypersonic_cyclic_dataset.sql");
  }
  protected int[] setupTablesSizeFixture() {
    int[] sizes = new int[] { 2, 1, 1 };
    return sizes;
  }
  
  public void testAWithOne() throws DataSetException, SQLException, SearchException {
    addInput( A, new String[] { A1 } );
    addOutput( C, new String[] { C1 } );
    addOutput( B, new String[] { B1 } );
    addOutput( A, new String[] { A1 } );
    doIt();      
  }
  
  public void testAWithTwo() throws DataSetException, SQLException, SearchException {
    addInput( A, new String[] { A1, A2 } );
    addOutput( C, new String[] { C1 } );
    addOutput( B, new String[] { B1 } );
    addOutput( A, new String[] { A1, A2 } );
    doIt();      
  }
  
  public void testAWithTwoInvertedInput() throws DataSetException, SQLException, SearchException {
    addInput( A, new String[] { A2, A1 } );
    addOutput( C, new String[] { C1 } );
    addOutput( B, new String[] { B1 } );
    addOutput( A, new String[] { A1, A2 } );
    doIt();      
  }
  
  public void testAWithTwoInvertedOutput() throws DataSetException, SQLException, SearchException {
    addInput( A, new String[] { A1, A2 } );
    addOutput( C, new String[] { C1 } );
    addOutput( B, new String[] { B1 } );
    addOutput( A, new String[] { A2, A1 } );
    doIt();      
  }
  
  public void testAWithRepatead() throws DataSetException, SQLException, SearchException {
    addInput( A, new String[] { A1, A2, A1, A2, A1, A1, A2, A2, A2, A1 } );
    addOutput( C, new String[] { C1 } );
    addOutput( B, new String[] { B1 } );
    addOutput( A, new String[] { A2, A1 } );
    doIt();      
  }
  
  public void testBWithOne() throws DataSetException, SQLException, SearchException {
    addInput( B, new String[] { B1 } );
    addOutput( C, new String[] { C1 } );
    addOutput( B, new String[] { B1 } );
    addOutput( A, new String[] { A2 } );
    doIt();      
  }
  
  public void testCWithOne() throws DataSetException, SQLException, SearchException {
    addInput( C, new String[] { C1 } );
    addOutput( C, new String[] { C1 } );
    addOutput( B, new String[] { B1 } );
    addOutput( A, new String[] { A2 } );
    doIt();      
  }
  
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -