Example #1
0
  @Test
  public void multipleInstancesOfDataStores() throws Exception {
    // act / when
    final TestDataStore h2 = (TestDataStore) DataStores.getDataStore("h2", this);
    final TestDataStore oracle = (TestDataStore) DataStores.getDataStore("oracle", this);
    final TestDataStore db2 = (TestDataStore) DataStores.getDataStore("db2", this);

    // assert / then
    assertThat("H2!=Oracle?", h2, not(sameInstance(oracle)));
    assertThat("H2!=DB2?", h2, not(sameInstance(db2)));
    assertThat("Oracle!=DB2?", oracle, not(sameInstance(db2)));
  }
Example #2
0
 private static void verifyDataStoreExecution(
     Consumer<DataStore> doExecuteMethod, int times, String... dataStoreIds) {
   for (String dataStoreId : dataStoreIds) {
     doExecuteMethod.accept(
         Mockito.verify(
             DataStores.getDataStore(IntegrateAllTest.class, dataStoreId), times(times)));
   }
 }
Example #3
0
 @After
 public void dataStoresReset() throws Exception {
   DataSetDriver.reset();
   DataStores.reset();
 }
Example #4
0
 private static TestDataStore getDataStore(String dataStoreId) {
   return (TestDataStore) DataStores.getDataStore(IntegrateAllTest.class, dataStoreId);
 }