use of org.junit.experimental.results.PrintableResult in project junit4 by junit-team.
the class VerifierRuleTest method usedErrorCollectorCheckThrowsMatchingClassShouldPass.
@Test
public void usedErrorCollectorCheckThrowsMatchingClassShouldPass() {
PrintableResult testResult = testResult(UsesErrorCollectorCheckThrowsMatchingClass.class);
assertThat(testResult, isSuccessful());
}
use of org.junit.experimental.results.PrintableResult in project junit4 by junit-team.
the class VerifierRuleTest method usedErrorCollectorCheckSucceedsShouldFail.
@Test
public void usedErrorCollectorCheckSucceedsShouldFail() {
PrintableResult testResult = testResult(UsesErrorCollectorCheckSucceeds.class);
assertThat(testResult, hasFailureContaining("first!"));
assertThat(testResult, hasFailureContaining("second!"));
}
use of org.junit.experimental.results.PrintableResult in project junit4 by junit-team.
the class WithUnresolvedGenericTypeVariablesOnTheoryParms method whereTypeVariablesAbound.
@Test
public void whereTypeVariablesAbound() {
PrintableResult result = testResult(TypeVariablesAbound.class);
assertThat(result, failureCountIs(1));
assertThat(result, hasFailureContaining("unresolved type variable A"));
assertThat(result, hasFailureContaining("unresolved type variable B"));
assertThat(result, hasFailureContaining("unresolved type variable C"));
assertThat(result, hasFailureContaining("unresolved type variable D"));
assertThat(result, hasFailureContaining("unresolved type variable E"));
assertThat(result, hasFailureContaining("unresolved type variable F"));
assertThat(result, hasFailureContaining("unresolved type variable G"));
}
use of org.junit.experimental.results.PrintableResult in project junit4 by junit-team.
the class WithUnresolvedGenericTypeVariablesOnTheoryParms method whereTypeVariableIsOnParameterizedTheoryParm.
@Test
public void whereTypeVariableIsOnParameterizedTheoryParm() {
PrintableResult result = testResult(TypeVariableOnParameterizedTheoryParm.class);
assertThat(result, hasSingleFailureContaining("unresolved type variable T"));
}
Aggregations