コード例 #1
0
  @Test
  public void unsupportedEnvironmentInstantiationShouldRaiseException() throws Exception {
    expectedEx.expect(IllegalArgumentException.class);
    expectedEx.expectMessage("DB Environment not supported:" + NE_DB_ENVIRONMENT_NAME);

    factory.createEnvironmentInstance(NE_DB_ENVIRONMENT_NAME);
  }
コード例 #2
0
  @Test
  public void newDbEnvironmentWithMissingDriverShouldRaiseSelfExplainingException()
      throws Exception {
    expectedEx.expectMessage(
        "Cannot load " + SOME_ENVIRONMENT_NAME + " database driver " + NE_DRIVER_CLASS_NAME);

    DBEnvironment env = factory.createEnvironmentInstance(SOME_ENVIRONMENT_NAME);
  }