@Test public void can_properly_compute_Assert_types() throws Exception { TypeToken<ClassUtilTest> thisType = TypeToken.of(ClassUtilTest.class); assertThat(getAssertType(thisType, thisType.getRawType().getPackage().getName())) .as("resolves non-built-in type correctly") .isEqualTo("ClassUtilTestAssert"); TypeToken<Boolean> primitive = TypeToken.of(boolean.class); assertThat(getAssertType(primitive, thisType.getRawType().getPackage().getName())) .as("resolves primitive correctly") .isEqualTo(BooleanAssert.class.getName()); TypeToken<Boolean> wrapper = TypeToken.of(Boolean.class); assertThat(getAssertType(wrapper, thisType.getRawType().getPackage().getName())) .as("resolves primitive wrapper correctly") .isEqualTo(BooleanAssert.class.getName()); assertThat(getAssertType(wrapper, BooleanAssert.class.getPackage().getName())) .as("resolves package correctly for built-in package") .isEqualTo(BooleanAssert.class.getSimpleName()); }
@Override protected BooleanAssert invoke_api_method() { return assertions.isEqualTo(false); }
@Override protected BooleanAssert invoke_api_method() { return assertions.isTrue(); }
@Override protected BooleanAssert invoke_api_method() { return assertions.isFalse(); }
@Override protected BooleanAssert invoke_api_method() { return assertions.isNotEqualTo(false); }
@Override protected BooleanAssert invoke_api_method() { // Not used in this test return null; }
@Override protected BooleanAssert invoke_api_method() { return assertions.usingDefaultComparator(); }