Package org.junit.experimental.results

Examples of org.junit.experimental.results.PrintableResult


        }
    }

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


        }
    }

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

        }
    }

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

        }
    }

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

        }
    }

    @Test
    public void whereTypeVariablesAbound() {
        PrintableResult result = testResult(TypeVariablesAbound.class);
        assertThat(result, failureCountIs(7));
        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"));
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

        }
    }

    @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

        }
    }

    @Test
    public void usedErrorCollectorCheckThatShouldFail() {
        PrintableResult testResult = testResult(UsesErrorCollectorCheckThat.class);
        assertThat(testResult, hasFailureContaining("was <3>"));
        assertThat(testResult, hasFailureContaining("was <5>"));
        assertThat(testResult, hasFailureContaining("reason 1"));
        assertThat(testResult, hasFailureContaining("was <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

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.