Examples of RunListener


Examples of org.apache.maven.surefire.report.RunListener

        throws TestSetFailedException
    {
        DefaultReporterFactory reporterFactory = createReporterFactory();
        HashMap<String, TestSet> classMethodCounts = new HashMap<String, TestSet>();
        final DefaultConsoleReporter defaultConsoleReporter = new DefaultConsoleReporter( System.out );
        RunListener reporter =
            new ClassesParallelRunListener( classMethodCounts, reporterFactory, defaultConsoleReporter );
        JUnitCoreRunListener runListener = new JUnitCoreRunListener( reporter, classMethodCounts );
        RunStatistics result = runClasses( reporterFactory, runListener, classes );
        assertReporter( result, success, ignored, failure, "classes" );
        classMethodCounts.clear();
View Full Code Here

Examples of org.apache.maven.surefire.report.RunListener

        final StandardTestRun standardTestRun = new StandardTestRun();
        standardTestRun.run();

        reset();
        RunListener forkingReporter = createForkingRunListener( defaultChannel );

        ReportEntry reportEntry = createDefaultReportEntry();
        forkingReporter.testSetStarting( reportEntry );
        forkingReporter.testStarting( reportEntry );
        forkingReporter.testSucceeded( reportEntry );
        forkingReporter.testSetCompleted( reportEntry );

        TestSetMockReporterFactory providerReporterFactory = new TestSetMockReporterFactory();
        ForkClient forkStreamClient = new ForkClient( providerReporterFactory, new Properties() );

        forkStreamClient.consumeMultiLineContent( content.toString( "utf-8" ) );
View Full Code Here

Examples of org.apache.maven.surefire.report.RunListener

        upgradeCheck();

        final ReporterFactory reporterFactory = providerParameters.getReporterFactory();

        final RunListener reporter = reporterFactory.createReporter();

        ConsoleOutputCapture.startCapture( (ConsoleOutputReceiver) reporter );

        JUnit4RunListener jUnit4TestSetReporter = new JUnit4RunListener( reporter );
View Full Code Here

Examples of org.junit.runner.notification.RunListener

    @Test
    public void listenersAreCalledCorrectlyInTheFaceOfFailures()
            throws Exception {
        JUnitCore core = new JUnitCore();
        final List<Failure> failures = new ArrayList<Failure>();
        core.addListener(new RunListener() {
            @Override
            public void testRunFinished(Result result) throws Exception {
                failures.addAll(result.getFailures());
            }
        });
View Full Code Here

Examples of org.junit.runner.notification.RunListener

public class OldTestClassAdaptingListenerTest {
    @Test
    public void addFailureDelegatesToNotifier() {
        Result result = new Result();
        RunListener listener = result.createListener();
        RunNotifier notifier = new RunNotifier();
        notifier.addFirstListener(listener);
        TestCase testCase = new TestCase() {
        };
        TestListener adaptingListener = new JUnit38ClassRunner(testCase)
View Full Code Here

Examples of org.junit.runner.notification.RunListener

    }

    @Test
    public void testListener() throws Exception {
        JUnitCore runner = new JUnitCore();
        RunListener listener = new RunListener() {
            @Override
            public void testStarted(Description description) {
                assertEquals(Description.createTestDescription(OneTest.class, "testOne"),
                        description);
                count++;
View Full Code Here

Examples of org.junit.runner.notification.RunListener

    @Test
    public void failedAssumptionsCanBeDetectedByListeners() {
        assumptionFailures = 0;
        JUnitCore core = new JUnitCore();
        core.addListener(new RunListener() {
            @Override
            public void testAssumptionFailure(Failure failure) {
                assumptionFailures++;
            }
        });
View Full Code Here

Examples of org.junit.runner.notification.RunListener

     * {@link Failure} objects that were {@link AssumptionViolatedException}s.
     */
    private static List<Failure> runAndGetAssumptionFailures(Class<?> clazz) {
        final List<Failure> failures = new ArrayList<Failure>();
        final JUnitCore core = new JUnitCore();
        core.addListener(new RunListener() {
            @Override
            public void testAssumptionFailure(Failure failure) {
                failures.add(failure);
            }
        });
View Full Code Here

Examples of org.junit.runner.notification.RunListener

    @Test
    public void testFinished() {
        JUnitCore runner = new JUnitCore();
        wasRun = false;
        RunListener listener = new MyListener() {
            @Override
            public void testFinished(Description description) {
                wasRun = true;
            }
        };
View Full Code Here

Examples of org.junit.runner.notification.RunListener

    @Test
    public void notifyListenersInTheOrderInWhichTheyAreAdded() {
        JUnitCore core = new JUnitCore();
        log = "";
        core.addListener(new RunListener() {
            @Override
            public void testRunStarted(Description description) throws Exception {
                log += "first ";
            }
        });
        core.addListener(new RunListener() {
            @Override
            public void testRunStarted(Description description) throws Exception {
                log += "second ";
            }
        });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.