Package org.junit.experimental.results

Examples of org.junit.experimental.results.PrintableResult


        }
    }

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


        thrown.expect(IllegalArgumentException.class);
        repo.generatorFor(Object.class);
    }

    @Test public void autoGenerationOnPrimitiveType() {
        PrintableResult result = testResult(WithAutoGenerationOnPrimitiveType.class);
        assertThat(result, hasSingleFailureContaining(ReflectionException.class.getName()));
        assertThat(result, hasSingleFailureContaining(InstantiationException.class.getName()));
    }
View Full Code Here

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

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

        thrown.expect(IllegalArgumentException.class);
        repo.generatorFor(Object.class);
    }

    @Test public void autoGenerationOnPrimitiveType() {
        PrintableResult result = testResult(WithAutoGenerationOnPrimitiveType.class);
        assertThat(result, hasSingleFailureContaining(ReflectionException.class.getName()));
        assertThat(result, hasSingleFailureContaining(InstantiationException.class.getName()));
    }
View Full Code Here

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

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

        return new StackTraceElement[] { new StackTraceElement(
            stackTraceClassName, "methodName", "fileName", 1) };
      }
    });

    assertThat(new PrintableResult(asList(failure)).toString(), allOf(
        containsString(descriptionName), containsString(stackTraceClassName)));
  }
View Full Code Here

  @DataPoint
  public static String SHELL_POINT= "Shell Point";

  @Theory
  public void includeMultipleFailures(String secondExceptionName) {
    PrintableResult backtrace= new PrintableResult(Arrays.asList(
        new Failure(Description.createSuiteDescription("firstName"),
            new RuntimeException("firstException")), new Failure(
            Description.createSuiteDescription("secondName"),
            new RuntimeException(secondExceptionName))));
    assertThat(backtrace.toString(), containsString(secondExceptionName));
  }
View Full Code Here

        thrown.expect(IllegalArgumentException.class);
        repo.generatorFor(Object.class);
    }

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

        @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

        thrown.expect(IllegalArgumentException.class);
        repo.generatorFor(Object.class);
    }

    @Test public void autoGenerationOnPrimitiveType() {
        PrintableResult result = testResult(WithAutoGenerationOnPrimitiveType.class);
        assertThat(result, hasSingleFailureContaining(ReflectionException.class.getName()));
        assertThat(result, hasSingleFailureContaining("single accessible constructor"));
    }
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.