Search in sources :

Example 1 with DbMetaDataKey

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

the class Test_DbMetaData method putGetProperty.

@Test
public void putGetProperty() throws RbvException {
    DbMetaData metaData = new DbMetaData();
    metaData.putProperty(new DbMetaDataKey("", "column"), "test_value");
    assertEquals("test_value", metaData.getProperty(new DbMetaDataKey("column")));
}
Also used : DbMetaData(com.axway.ats.rbv.db.DbMetaData) DbMetaDataKey(com.axway.ats.rbv.db.DbMetaDataKey) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 2 with DbMetaDataKey

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

the class Test_DbMetaDataKey method verifyConstructorTableColumnAndIndex.

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

Example 3 with DbMetaDataKey

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

the class Test_DbMetaDataKey method verifyConstructorColumnOnly.

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

Example 4 with DbMetaDataKey

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

the class Test_DbMetaDataKey method verifyConstructorTableAndColumn.

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

Example 5 with DbMetaDataKey

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

the class Test_DbMetaDataKey method verifyConstructorNullTableColumnAndIndex.

@Test
public void verifyConstructorNullTableColumnAndIndex() {
    DbMetaDataKey metaKey;
    metaKey = new DbMetaDataKey(null, "column", 15);
    assertEquals(metaKey.getTableName(), null);
    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