Package org.apache.maven.scm

Examples of org.apache.maven.scm.CommandParameters


        when( accurev.defunct( basedir, testFileSet.getFileList(), "A deleted file" ) ).thenReturn( removedFiles );

        AccuRevRemoveCommand command = new AccuRevRemoveCommand( getLogger() );

        CommandParameters commandParameters = new CommandParameters();
        commandParameters.setString( CommandParameter.MESSAGE, "A deleted file" );
        RemoveScmResult result = command.remove( repo, testFileSet, commandParameters );

        assertThat( result.isSuccess(), is( true ) );
        assertThat( result.getRemovedFiles().size(), is( 1 ) );
        assertHasScmFile( result.getRemovedFiles(), "removed/file", ScmFileStatus.DELETED );
View Full Code Here


        info.setUser( "(not logged in)" );
        when( accurev.info( any( File.class ) ) ).thenReturn( info );
        when( accurev.login( "myUser", "aPassword" ) ).thenReturn( true );
        AccuRevLoginCommand command = new AccuRevLoginCommand( getLogger() );

        LoginScmResult result = command.login( repo, new ScmFileSet( basedir ), new CommandParameters() );

        assertThat( result.isSuccess(), is( true ) );
        verify( accurev ).login( "myUser", "aPassword" );

    }
View Full Code Here

        info.setUser( "A.N.Other" );
        when( accurev.info( any( File.class ) ) ).thenReturn( info );
        when( accurev.login( "myUser", "aPassword" ) ).thenReturn( true );
        AccuRevLoginCommand command = new AccuRevLoginCommand( getLogger() );

        LoginScmResult result = command.login( repo, new ScmFileSet( basedir ), new CommandParameters() );

        assertThat( result.isSuccess(), is( true ) );
        verify( accurev ).login( "myUser", "aPassword" );

    }
View Full Code Here

        repo.setPassword( "aPassword" );
        info.setUser( "myUser" );
        when( accurev.info( any( File.class ) ) ).thenReturn( info );
        AccuRevLoginCommand command = new AccuRevLoginCommand( getLogger() );

        LoginScmResult result = command.login( repo, new ScmFileSet( basedir ), new CommandParameters() );

        assertThat( result.isSuccess(), is( true ) );
        // This is an important case as logging in will start an expiry timer
        // that might be shorter than the current expiry timer!
        verify( accurev, never() ).login( eq( "myUser" ), anyString() );
View Full Code Here

        when( accurev.defunct( basedir, testFileSet.getFileList(), "A deleted file" ) ).thenReturn( null );

        AccuRevRemoveCommand command = new AccuRevRemoveCommand( getLogger() );

        CommandParameters commandParameters = new CommandParameters();
        commandParameters.setString( CommandParameter.MESSAGE, "A deleted file" );
        RemoveScmResult result = command.remove( repo, testFileSet, commandParameters );

        assertThat( result.isSuccess(), is( false ) );
        assertThat( result.getProviderMessage(), notNullValue() );
    }
View Full Code Here

        repo.setUser( null );
        info.setUser( "anyUser" );
        when( accurev.info( any( File.class ) ) ).thenReturn( info );
        AccuRevLoginCommand command = new AccuRevLoginCommand( getLogger() );

        LoginScmResult result = command.login( repo, new ScmFileSet( basedir ), new CommandParameters() );

        assertThat( result.isSuccess(), is( true ) );
        verify( accurev, never() ).login( anyString(), anyString() );

    }
View Full Code Here

        repo.setUser( null );
        info.setUser( "(not logged in)" );
        when( accurev.info( any( File.class ) ) ).thenReturn( info );
        AccuRevLoginCommand command = new AccuRevLoginCommand( getLogger() );

        LoginScmResult result = command.login( repo, new ScmFileSet( basedir ), new CommandParameters() );

        assertThat( result.isSuccess(), is( false ) );
        verify( accurev, never() ).login( anyString(), anyString() );

    }
View Full Code Here

        List<File> updatedFiles = Collections.singletonList( new File( "updated/file" ) );
        when( accurev.update( basedir, "now" ) ).thenReturn( updatedFiles );

        AccuRevCheckOutCommand command = new AccuRevCheckOutCommand( getLogger() );

        CheckOutScmResult result = command.checkout( repo, new ScmFileSet( basedir ), new CommandParameters() );

        assertThat( result.isSuccess(), is( true ) );
        assertThat( result.getRelativePathProjectDirectory(), is( "/project/dir" ) );
        List<ScmFile> checkedOutFiles = result.getCheckedOutFiles();
        assertThat( checkedOutFiles.size(), is( 1 ) );
View Full Code Here

                                                                                                                                true );
        when( accurev.update( basedir, "now" ) ).thenReturn( null );

        AccuRevCheckOutCommand command = new AccuRevCheckOutCommand( getLogger() );

        CheckOutScmResult result = command.checkout( repo, new ScmFileSet( basedir ), new CommandParameters() );

        assertThat( result.isSuccess(), is( false ) );
        assertThat( result.getProviderMessage(), notNullValue() );

    }
View Full Code Here

        List<File> updatedFiles = Collections.singletonList( new File( "updated/file" ) );
        when( accurev.update( basedir, null ) ).thenReturn( updatedFiles );

        AccuRevCheckOutCommand command = new AccuRevCheckOutCommand( getLogger() );

        CheckOutScmResult result = command.checkout( repo, new ScmFileSet( basedir ), new CommandParameters() );

        verify( accurev ).pop( basedir, null );

        assertThat( result.isSuccess(), is( true ) );
        assertThat( result.getRelativePathProjectDirectory(), is( "/project/dir" ) );
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.CommandParameters

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.