Search in sources :

Example 6 with DbMetaDataKey

use of com.axway.ats.rbv.db.DbMetaDataKey in project ats-framework by Axway.

the class Test_DbMetaDataKey method verifyConstructorDbColumn.

@Test
public void verifyConstructorDbColumn() {
    DbMetaDataKey metaKey;
    metaKey = new DbMetaDataKey(new DbColumn("table", "column", 13));
    assertEquals(metaKey.getTableName(), "table");
    assertEquals(metaKey.getColumnName(), "column");
    assertEquals(metaKey.getIndex(), 13);
    assertEquals(metaKey.toString(), "table.column.13");
    metaKey = new DbMetaDataKey(new DbColumn("column", 5));
    assertEquals(metaKey.getTableName(), "");
    assertEquals(metaKey.getColumnName(), "column");
    assertEquals(metaKey.getIndex(), 5);
    assertEquals(metaKey.toString(), "column.5");
    metaKey = new DbMetaDataKey(new DbColumn("table", "column"));
    assertEquals(metaKey.getTableName(), "table");
    assertEquals(metaKey.getColumnName(), "column");
    assertEquals(metaKey.getIndex(), 0);
    assertEquals(metaKey.toString(), "table.column");
}
Also used : DbColumn(com.axway.ats.core.dbaccess.DbColumn) DbMetaDataKey(com.axway.ats.rbv.db.DbMetaDataKey) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 7 with DbMetaDataKey

use of com.axway.ats.rbv.db.DbMetaDataKey in project ats-framework by Axway.

the class Test_DbMetaDataKey method verifyConstructorColumnAndIndex.

@Test
public void verifyConstructorColumnAndIndex() {
    DbMetaDataKey metaKey;
    metaKey = new DbMetaDataKey("column", 15);
    assertEquals(metaKey.getTableName(), "");
    assertEquals(metaKey.getColumnName(), "column");
    assertEquals(metaKey.getIndex(), 15);
    assertEquals(metaKey.toString(), "column.15");
}
Also used : DbMetaDataKey(com.axway.ats.rbv.db.DbMetaDataKey) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Aggregations

BaseTest (com.axway.ats.rbv.BaseTest)7 DbMetaDataKey (com.axway.ats.rbv.db.DbMetaDataKey)7 Test (org.junit.Test)7 DbColumn (com.axway.ats.core.dbaccess.DbColumn)1 DbMetaData (com.axway.ats.rbv.db.DbMetaData)1