Package org.apache.maven.plugin.surefire.booterclient.output

Examples of org.apache.maven.plugin.surefire.booterclient.output.ForkClient


        reset();
        createForkingRunListener( defaultChannel );

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

        forkStreamClient.consumeMultiLineContent( content.toString( "utf-8" ) );

        assertTrue( testVmSystemProperties.size() > 1 );
    }
View Full Code Here


        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" ) );

        final MockReporter reporter = (MockReporter) forkStreamClient.getReporter( defaultChannel );
        final List<String> events = reporter.getEvents();
        assertEquals( MockReporter.SET_STARTING, events.get( 0 ) );
        assertEquals( MockReporter.TEST_STARTING, events.get( 1 ) );
        assertEquals( MockReporter.TEST_SUCCEEDED, events.get( 2 ) );
        assertEquals( MockReporter.SET_COMPLETED, events.get( 3 ) );
View Full Code Here

        new ForkingRunListener( printStream, defaultChannel, false ).testStarting( expected );
        new ForkingRunListener( printStream, anotherChannel, false ).testSkipped( secondExpected );

        TestSetMockReporterFactory providerReporterFactory = new TestSetMockReporterFactory();
        final ForkClient forkStreamClient = new ForkClient( providerReporterFactory, new Properties() );
        forkStreamClient.consumeMultiLineContent( content.toString( "utf-8" ) );

        MockReporter reporter = (MockReporter) forkStreamClient.getReporter( defaultChannel );
        Assert.assertEquals( MockReporter.TEST_STARTING, reporter.getFirstEvent() );
        Assert.assertEquals( expected, reporter.getFirstData() );
        Assert.assertEquals( 1, reporter.getEvents().size() );

        MockReporter reporter2 = (MockReporter) forkStreamClient.getReporter( anotherChannel );
        Assert.assertEquals( MockReporter.TEST_SKIPPED, reporter2.getFirstEvent() );
        Assert.assertEquals( secondExpected, reporter2.getFirstData() );
        Assert.assertEquals( 1, reporter2.getEvents().size() );
    }
View Full Code Here

        public void clientReceiveContent()
            throws ReporterException, IOException
        {
            TestSetMockReporterFactory providerReporterFactory = new TestSetMockReporterFactory();
            final ForkClient forkStreamClient = new ForkClient( providerReporterFactory, new Properties() );
            forkStreamClient.consumeMultiLineContent( content.toString( ) );
            reporter = (MockReporter) forkStreamClient.getReporter( defaultChannel );
        }
View Full Code Here

        {
            Properties providerProperties = providerConfiguration.getProviderProperties();
            scanResult.writeTo( providerProperties );
            if ( isForkOnce() )
            {
                final ForkClient forkClient =
                    new ForkClient( defaultReporterFactory, startupReportConfiguration.getTestVmSystemProperties() );
                result = fork( null, new PropertiesWrapper( providerProperties ), forkClient, effectiveSystemProperties,
                               null );
            }
            else
            {
View Full Code Here

                        throws Exception
                    {
                        TestProvidingInputStream testProvidingInputStream =
                            new TestProvidingInputStream( messageQueue );

                        ForkClient forkClient = new ForkClient( defaultReporterFactory,
                                                                startupReportConfiguration.getTestVmSystemProperties(),
                                                                testProvidingInputStream );

                        return fork( null, new PropertiesWrapper( providerConfiguration.getProviderProperties() ),
                                     forkClient, effectiveSystemProperties, testProvidingInputStream );
View Full Code Here

                Callable<RunResult> pf = new Callable<RunResult>()
                {
                    public RunResult call()
                        throws Exception
                    {
                        ForkClient forkClient = new ForkClient( defaultReporterFactory,
                                                                startupReportConfiguration.getTestVmSystemProperties() );
                        return fork( testSet, new PropertiesWrapper( providerConfiguration.getProviderProperties() ),
                                     forkClient, effectiveSystemProperties, null );
                    }
                };
View Full Code Here

        final String requestedForkMode = forkConfiguration.getForkMode();
        try
        {
            if ( ForkConfiguration.FORK_ONCE.equals( requestedForkMode ) )
            {
                final ForkClient forkClient =
                    new ForkClient( fileReporterFactory, startupReportConfiguration.getTestVmSystemProperties() );
                result = fork( null, providerConfiguration.getProviderProperties(), forkClient,
                               fileReporterFactory.getGlobalRunStatistics() );
            }
            else if ( ForkConfiguration.FORK_ALWAYS.equals( requestedForkMode ) )
            {
View Full Code Here

            RunResult globalResult = new RunResult( 0, 0, 0, 0 );
            final Iterator suites = getSuitesIterator();
            while ( suites.hasNext() )
            {
                final Object testSet = suites.next();
                final ForkClient forkClient =
                    new ForkClient( fileReporterFactory, startupReportConfiguration.getTestVmSystemProperties() );
                Callable<RunResult> pf = new Callable<RunResult>()
                {
                    public RunResult call()
                        throws Exception
                    {
View Full Code Here

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

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

        forkStreamClient.consumeMultiLineContent( content.toString( "utf-8" ) );

        assertTrue( testVmSystemProperties.size() > 1 );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.surefire.booterclient.output.ForkClient

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.