Package org.junit.experimental.results

Examples of org.junit.experimental.results.PrintableResult


        }
    }

    @Test
    public void dataPointFieldsMustBePublic() {
        PrintableResult result = testResult(DataPointFieldsMustBePublic.class);       
        assertEquals(6, result.failureCount());

        assertThat(result,
                allOf(hasFailureContaining("DataPoint field THREE must be public"),
                      hasFailureContaining("DataPoint field THREES must be public"),
                      hasFailureContaining("DataPoint field FOUR must be public"),
View Full Code Here


        }
    }
   
    @Test
    public void dataPointMethodsMustBePublic() {
        PrintableResult result = testResult(DataPointMethodsMustBePublic.class);       
        assertEquals(6, result.failureCount());

        assertThat(result,
                allOf(hasFailureContaining("DataPoint method three must be public"),
                      hasFailureContaining("DataPoint method threes must be public"),
                      hasFailureContaining("DataPoint method four must be public"),
View Full Code Here

        }
    }

    @Test
    public void testWatcherSkippedThrowsException() {
        PrintableResult result = testResult(TestWatcherSkippedThrowsExceptionTest.class);
        assertThat(result, failureCountIs(2));
        assertThat(result, hasFailureContaining("test failure"));
        assertThat(result, hasFailureContaining("watcher failure"));
    }
View Full Code Here

        }
    }

    @Test
    public void testWatcherFailedThrowsException() {
        PrintableResult result = testResult(TestWatcherFailedThrowsExceptionTest.class);
        assertThat(result, failureCountIs(2));
        assertThat(result, hasFailureContaining("test failure"));
        assertThat(result, hasFailureContaining("watcher failure"));
    }
View Full Code Here

        }
    }

    @Test
    public void testWatcherStartingThrowsException() {
        PrintableResult result = testResult(TestWatcherStartingThrowsExceptionTest.class);
        assertThat(result, failureCountIs(2));
        assertThat(result, hasFailureContaining("test failure"));
        assertThat(result, hasFailureContaining("watcher failure"));
    }
View Full Code Here

        }
    }

    @Test
    public void testWatcherFailedAndFinishedThrowsException() {
        PrintableResult result = testResult(TestWatcherFailedAndFinishedThrowsExceptionTest.class);
        assertThat(result, failureCountIs(3));
        assertThat(result, hasFailureContaining("test failure"));
        assertThat(result, hasFailureContaining("watcher failed failure"));
        assertThat(result, hasFailureContaining("watcher finished failure"));
    }
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

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.