Package org.apache.maven.surefire.its.fixture

Examples of org.apache.maven.surefire.its.fixture.TestFile.assertContainsText()


        surefireLauncher.executeTest();
        surefireLauncher.reset();
        surefireLauncher.executeSurefireReport( );
        OutputValidator module1 = surefireLauncher.getSubProjectValidator( "module1" );
        TestFile siteFile = module1.getSiteFile( "surefire-report.html" );
        siteFile.assertContainsText( "MyModule1ClassTest" );
        siteFile.assertContainsText( "MyDummyClassM1Test" );
    }

    public SurefireLauncher unpack()
    {
View Full Code Here


        surefireLauncher.reset();
        surefireLauncher.executeSurefireReport( );
        OutputValidator module1 = surefireLauncher.getSubProjectValidator( "module1" );
        TestFile siteFile = module1.getSiteFile( "surefire-report.html" );
        siteFile.assertContainsText( "MyModule1ClassTest" );
        siteFile.assertContainsText( "MyDummyClassM1Test" );
    }

    public SurefireLauncher unpack()
    {
        return unpack( "/surefire-570-multipleReportDirectories" );
View Full Code Here

        OutputValidator validator = unpack( "/surefire-740-comma-truncated" ).setMavenOpts(
                                                                                         "-Duser.language=ru -Duser.country=RU" ).failNever().addSurefireReportGoal().executeCurrentGoals();

        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        assertTrue( "Expecting file", siteFile.exists() );
        siteFile.assertContainsText( "027" ); // Avoid asserting with the "," or "." ;)
    }

}
View Full Code Here

    @Test
    public void testBuildFailingWhenErrors()
    {
        OutputValidator outputValidator = unpack( "/surefire-500-puzzling-error" ).failNever().executeTest();
        TestFile surefireReportsFile = outputValidator.getSurefireReportsFile( "surefire500.ExplodingTest.txt" );
        surefireReportsFile.assertContainsText( "java.lang.NoClassDefFoundError: whoops!" );
    }
}
View Full Code Here

    public void properNewlines()
    {
        final OutputValidator outputValidator =
            unpack( "/consoleOutput" ).redirectToFile( true ).setJUnitVersion( "4.7" ).executeTest();
        TestFile surefireReportsFile = outputValidator.getSurefireReportsFile( "consoleOutput.Test1-output.txt" );
        surefireReportsFile.assertContainsText( "SoutAgain" );
        surefireReportsFile.assertContainsText( "Printline in shutdown hook" );
    }

}
View Full Code Here

    {
        final OutputValidator outputValidator =
            unpack( "/consoleOutput" ).redirectToFile( true ).setJUnitVersion( "4.7" ).executeTest();
        TestFile surefireReportsFile = outputValidator.getSurefireReportsFile( "consoleOutput.Test1-output.txt" );
        surefireReportsFile.assertContainsText( "SoutAgain" );
        surefireReportsFile.assertContainsText( "Printline in shutdown hook" );
    }

}
View Full Code Here

    {
        final OutputValidator outputValidator = unpack( "/fork-consoleOutputWithErrors" ).
            failNever().redirectToFile( true ).executeTest();
        final TestFile surefireReportsFile =
            outputValidator.getSurefireReportsFile( "TEST-forkConsoleOutput.Test2.xml" );
        surefireReportsFile.assertContainsText( "sout: Will Fail soon" );
        surefireReportsFile.assertContainsText( "serr: Will Fail now" );
    }
}
View Full Code Here

        final OutputValidator outputValidator = unpack( "/fork-consoleOutputWithErrors" ).
            failNever().redirectToFile( true ).executeTest();
        final TestFile surefireReportsFile =
            outputValidator.getSurefireReportsFile( "TEST-forkConsoleOutput.Test2.xml" );
        surefireReportsFile.assertContainsText( "sout: Will Fail soon" );
        surefireReportsFile.assertContainsText( "serr: Will Fail now" );
    }
}
View Full Code Here

        OutputValidator validator = unpack( "/surefire-740-comma-truncated" ).addEnvVar( "MAVEN_OPTS",
                                                                                         "-Duser.language=ru -Duser.country=RU" ).failNever().addSurefireReportGoal().executeCurrentGoals();

        TestFile siteFile = validator.getSiteFile( "surefire-report.html" );
        assertTrue( "Expecting file", siteFile.exists() );
        siteFile.assertContainsText( "027" ); // Avoid asserting with the "," or "." ;)
    }

}
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.