use of com.axway.ats.rbv.db.DbStorage in project ats-framework by Axway.
the class Test_DbFolder method getMetaDataCountsSecondPollingDataChanged.
@Test
public void getMetaDataCountsSecondPollingDataChanged() throws Exception {
MockDbProvider dbProvider = new MockDbProvider();
DbStorage storage = new DbStorage(dbProvider);
Matchable folder = storage.getFolder(new DbSearchTerm(""));
folder.open();
folder.getNewMetaData();
//change the meta data for one of the records
dbProvider.incrementSeed();
folder.getNewMetaData();
assertEquals("Total DB records: 2, new DB records: 2", folder.getMetaDataCounts());
folder.close();
}
use of com.axway.ats.rbv.db.DbStorage in project ats-framework by Axway.
the class Test_DbFolder method getMetaDataCountsNegativeFolderNotOpen.
@Test(expected = MatchableNotOpenException.class)
public void getMetaDataCountsNegativeFolderNotOpen() throws RbvStorageException {
DbStorage storage = new DbStorage(new MockDbProvider());
Matchable folder = storage.getFolder(new DbSearchTerm(""));
folder.getMetaDataCounts();
}
use of com.axway.ats.rbv.db.DbStorage in project ats-framework by Axway.
the class Test_DbFolder method getNewMetaDataNegativeFolderNotOpen.
@Test(expected = MatchableNotOpenException.class)
public void getNewMetaDataNegativeFolderNotOpen() throws RbvException {
DbStorage storage = new DbStorage(new MockDbProvider());
Matchable folder = storage.getFolder(new DbSearchTerm(""));
folder.getNewMetaData();
}
use of com.axway.ats.rbv.db.DbStorage in project ats-framework by Axway.
the class Test_DbFolder method getMetaDataCountsBeforePolling.
@Test(expected = RbvStorageException.class)
public void getMetaDataCountsBeforePolling() throws Exception {
DbStorage storage = new DbStorage(new MockDbProvider());
Matchable folder = storage.getFolder(new DbSearchTerm(""));
folder.open();
folder.getMetaDataCounts();
}
use of com.axway.ats.rbv.db.DbStorage in project ats-framework by Axway.
the class Test_DbFolder method getAllMetaData.
@Test
public void getAllMetaData() throws Exception {
DbStorage storage = new DbStorage(new MockDbProvider());
Matchable folder = storage.getFolder(new DbSearchTerm(""));
folder.open();
List<MetaData> metaData = folder.getAllMetaData();
assertEquals(2, metaData.size());
folder.close();
}
Aggregations