Package org.apache.maven.it

Examples of org.apache.maven.it.Verifier


{
        public void testit0001()
        throws Exception
    {
        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0001-CSharpCompileExe" );
        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
        verifier.executeGoal( "install" );
        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0001.cs" );
        verifier.assertFilePresent( "target/comments.xml" );
        verifier.assertFilePresent( "target/NMaven.It.It0001-1.0.0.exe" );
        verifier.verifyErrorFreeLog();
        verifier.resetStreams();
    }
View Full Code Here


        String metadataDir = "target/test-repo/NMaven/Its/" + artifactId + "/";
        String artifactDir = metadataDir + "1.0.0-SNAPSHOT/";

        File testDir =
            ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0015-DeployLibraryAsSnapshot" );
        Verifier verifier = new Verifier( testDir.getAbsolutePath() );

        verifier.executeGoal( "deploy" );
        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0015.cs" );
        verifier.assertFilePresent( "target/" + artifactName + ".dll" );
        verifier.assertFilePresent( artifactDir );
        verifier.assertFilePresent( metadataDir + "maven-metadata.xml" );
        verifier.resetStreams();
    }
View Full Code Here

    public void testit0009()
        throws Exception
    {
        File testDir =
            ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0009-CSharpCompileWithProvidedGacDependency" );
        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
        verifier.executeGoal( "install" );
        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0009.cs" );
        verifier.assertFilePresent( "target/NMaven.It.It0009-1.0.0.dll" );
        verifier.verifyErrorFreeLog();
        verifier.resetStreams();
    }
View Full Code Here

        String artifactName = artifactId + "-1.0.0";
        String metadataDir = "target/test-repo/NMaven/Its/" + artifactId + "/";
        String artifactDir = metadataDir + "1.0.0/";

        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0013-DeployWinexe" );
        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
        verifier.executeGoal( "deploy" );
        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0013.cs" );
        verifier.assertFilePresent( "target/" + artifactName + ".exe" );
        verifier.assertFilePresent( artifactDir + artifactName + ".exe" );
        verifier.assertFilePresent( artifactDir + artifactName + ".pom" );
        verifier.assertFilePresent( metadataDir + "maven-metadata.xml" );
        verifier.verifyErrorFreeLog();
        verifier.resetStreams();
    }
View Full Code Here

    public void testit0008()
        throws Exception
    {
        File testDir =
            ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0008-CSharpCompileWithProvidedDependency" );
        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
        verifier.executeGoal( "install" );
        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0008.cs" );
        verifier.assertFilePresent( "target/NMaven.It.It0008-1.0.0.dll" );
        verifier.verifyErrorFreeLog();
        verifier.resetStreams();
    }
View Full Code Here

        File generatedCSTargetFile = new File( testDir, "test/" + CS_GEN_FILENAME );
        fileWriter = new BufferedWriter( new FileWriter( generatedCSTargetFile ) );
        fileWriter.write( CS_GEN_SOURCE );
        fileWriter.close();

        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
        verifier.executeGoal( "install" );
        verifier.assertFilePresent(
            "target/" + BuildDirectories.BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0018.cs" );
        verifier.assertFilePresent(
            "target/" + BuildDirectories.BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0018Gen.cs" );
        verifier.assertFilePresent(
            "target/" + BuildDirectories.TEST_BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0018.cs" );
        verifier.assertFilePresent(
            "target/" + BuildDirectories.TEST_BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0018Gen.cs" );
        verifier.verifyErrorFreeLog();
        verifier.resetStreams();

        // Delete the generated file
        assertTrue( "Unable to delete generated source file", generatedCSSourceFile.delete() );
        assertTrue( "Unable to delete generated test file", generatedCSTargetFile.delete() );

        verifier.executeGoal( "install" );

        // Verify that the deleted file is purged from the staging compilation directory
        verifier.assertFileNotPresent(
            "target/" + BuildDirectories.BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0018Gen.cs" );
        verifier.assertFileNotPresent(
            "target/" + BuildDirectories.TEST_BUILD_SOURCES_GENERATED.getBuildDirectoryName() + "/It0018Gen.cs" );
        verifier.verifyErrorFreeLog();
        verifier.resetStreams();
    }
View Full Code Here

    extends AbstractMavenIntegrationTestCase
{
    public static Test suite()
        throws VerificationException
    {
        Verifier verifier = null;
        try
        {
            verifier = new Verifier( "" );
        }
        finally
        {
            if ( verifier != null )
            {
                verifier.resetStreams();
            }
        }

        TestSuite suite = new TestSuite();
View Full Code Here

{
    public void testit0019()
        throws Exception
    {
        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0019-BuildFailureOnNUnitFailure" );
        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
        verifier.executeGoal( "test" );
       
       
        // TODO: Need to verify that the build failed!
       
        verifier.resetStreams();
    }
View Full Code Here

{
    public void testit0010()
        throws Exception
    {
        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0010-DeployLibrary" );
        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
        verifier.executeGoal( "deploy" );
        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0010.cs" );
        verifier.assertFilePresent( "target/NMaven.It.It0010-1.0.0.dll" );
        verifier.assertFilePresent( "target/test-repo/NMaven/Its/NMaven.It.It0010/1.0.0/NMaven.It.It0010-1.0.0.dll" );
        verifier.assertFilePresent( "target/test-repo/NMaven/Its/NMaven.It.It0010/1.0.0/NMaven.It.It0010-1.0.0.pom" );
        verifier.assertFilePresent( "target/test-repo/NMaven/Its/NMaven.It.It0010/maven-metadata.xml" );
        verifier.verifyErrorFreeLog();
        verifier.resetStreams();
    }
View Full Code Here

    public void testit0005()
        throws Exception
    {
        File testDir =
            ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0005-CSharpCompileWithTransitiveDependency" );
        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
        verifier.executeGoal( "install" );
        verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES_MAIN.getBuildDirectoryName() + "/It0005.cs" );
        verifier.assertFilePresent( "target/NMaven.It.It0005-1.0.0.dll" );
        verifier.verifyErrorFreeLog();
        verifier.resetStreams();
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.it.Verifier

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.