Java 类com.google.common.util.concurrent.FuturesGetCheckedInputs.ExceptionWithoutThrowableConstructor 实例源码

项目:guava-mock    文件:FuturesGetCheckedTest.java   
public void testGetCheckedUntimed_exceptionClassUsedInitCause() {
  try {
    getChecked(FAILED_FUTURE_CHECKED_EXCEPTION, ExceptionWithoutThrowableConstructor.class);
    fail();
  } catch (ExceptionWithoutThrowableConstructor expected) {
    assertThat(expected.getMessage()).contains("mymessage");
    assertEquals(CHECKED_EXCEPTION, expected.getCause());
  }
}
项目:googles-monorepo-demo    文件:FuturesGetCheckedTest.java   
public void testGetCheckedUntimed_exceptionClassUsedInitCause() {
  try {
    getChecked(FAILED_FUTURE_CHECKED_EXCEPTION, ExceptionWithoutThrowableConstructor.class);
    fail();
  } catch (ExceptionWithoutThrowableConstructor expected) {
    assertThat(expected.getMessage()).contains("mymessage");
    assertEquals(CHECKED_EXCEPTION, expected.getCause());
  }
}
项目:guava    文件:FuturesGetCheckedTest.java   
public void testGetCheckedUntimed_exceptionClassUsedInitCause() {
  try {
    getChecked(FAILED_FUTURE_CHECKED_EXCEPTION, ExceptionWithoutThrowableConstructor.class);
    fail();
  } catch (ExceptionWithoutThrowableConstructor expected) {
    assertThat(expected.getMessage()).contains("mymessage");
    assertEquals(CHECKED_EXCEPTION, expected.getCause());
  }
}
项目:guava    文件:FuturesGetCheckedTest.java   
public void testGetCheckedUntimed_exceptionClassUsedInitCause() {
  try {
    getChecked(FAILED_FUTURE_CHECKED_EXCEPTION, ExceptionWithoutThrowableConstructor.class);
    fail();
  } catch (ExceptionWithoutThrowableConstructor expected) {
    assertThat(expected.getMessage()).contains("mymessage");
    assertEquals(CHECKED_EXCEPTION, expected.getCause());
  }
}