Package org.junit.experimental.results

Examples of org.junit.experimental.results.PrintableResult


        @Theory public void shouldHold(@ForAll @From(Ctor.class) int i) {
        }
    }

    @Test public void autoGenerationOnPrimitiveWrapperType() {
        PrintableResult result = testResult(WithAutoGenerationOnPrimitiveWrapperType.class);
        assertThat(result, hasSingleFailureContaining(ReflectionException.class.getName()));
        assertThat(result, hasSingleFailureContaining("single accessible constructor"));
    }
View Full Code Here


      collector.addError(new Throwable("second thing went wrong"));
    }
  }
 
  @Test public void usedErrorCollectorTwiceShouldFail() {
    PrintableResult testResult= testResult(UsesErrorCollectorTwice.class);
    assertThat(testResult, hasFailureContaining("first thing went wrong"));
    assertThat(testResult, hasFailureContaining("second thing went wrong"));
  }
View Full Code Here

      collector.checkThat("reason 2", 9, is(16));
    }
  }
 
  @Test public void usedErrorCollectorCheckThatShouldFail() {
    PrintableResult testResult= testResult(UsesErrorCollectorCheckThat.class);
    assertThat(testResult, hasFailureContaining("got: <3>"));
    assertThat(testResult, hasFailureContaining("got: <5>"));
    assertThat(testResult, hasFailureContaining("reason 1"));
    assertThat(testResult, hasFailureContaining("got: <7>"));
    assertThat(testResult, hasFailureContaining("reason 2"));
View Full Code Here

      });
    }
  }
 
  @Test public void usedErrorCollectorCheckSucceedsShouldFail() {
    PrintableResult testResult= testResult(UsesErrorCollectorCheckSucceeds.class);
    assertThat(testResult, hasFailureContaining("first!"));
    assertThat(testResult, hasFailureContaining("second!"));
  }
View Full Code Here

      }));
    }
  }
 
  @Test public void usedErrorCollectorCheckSucceedsShouldPass() {
    PrintableResult testResult= testResult(UsesErrorCollectorCheckSucceedsPasses.class);
    assertThat(testResult, isSuccessful());
  }
View Full Code Here

import org.junit.runner.RunWith;

public class WithUnresolvedGenericTypeVariablesOnTheoryParms {
  @Test
  public void whereTypeVariableIsOnTheTheory() {
    PrintableResult result= testResult(TypeVariableOnTheoryOnly.class);
    assertThat(result, isSuccessful());
  }
View Full Code Here

    }
  }

  @Test
  public void whereTypeVariableIsOnTheoryParm() {
    PrintableResult result= testResult(TypeVariableOnTheoryParm.class);
    assertThat(result, hasSingleFailureContaining("unresolved type variable T"));
  }
View Full Code Here

    }
  }

  @Test
  public void whereTypeVariableIsOnParameterizedTheoryParm() {
    PrintableResult result= testResult(TypeVariableOnParameterizedTheoryParm.class);
    assertThat(result, hasSingleFailureContaining("unresolved type variable T"));
  }
View Full Code Here

    }
  }

  @Test
  public void whereTypeVariableIsOnWildcardUpperBoundOnTheoryParm() {
    PrintableResult result= testResult(TypeVariableOnWildcardUpperBoundOnTheoryParm.class);
    assertThat(result, hasSingleFailureContaining("unresolved type variable U"));
  }
View Full Code Here

    }
  }

  @Test
  public void whereTypeVariableIsOnWildcardLowerBoundOnTheoryParm() {
    PrintableResult result= testResult(TypeVariableOnWildcardLowerBoundOnTheoryParm.class);
    assertThat(result, hasSingleFailureContaining("unresolved type variable V"));
  }
View Full Code Here

TOP

Related Classes of org.junit.experimental.results.PrintableResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.