@Test public void testReCheckoutExistingWorkspaceDifferentBasis() throws Exception { info.setWorkSpace( "someOldStream_someUser" ); info.setBasis( "myStream" ); info.setTop( basedir.getAbsolutePath() ); when( accurev.chws( basedir, "someOldStream_someUser", "mySnapShot" ) ).thenReturn( true ); List<File> emptyPop = Collections.emptyList(); when( accurev.popExternal( basedir, null, null, null ) ).thenReturn( emptyPop ); List<File> updatedFiles = Collections.singletonList( new File( "updated/file" ) ); when( accurev.update( basedir, null ) ).thenReturn( updatedFiles ); AccuRevCheckOutCommand command = new AccuRevCheckOutCommand( getLogger() ); CommandParameters params = new CommandParameters(); params.setScmVersion( CommandParameter.SCM_VERSION, new ScmTag( "mySnapShot" ) ); CheckOutScmResult result = command.checkout( repo, new ScmFileSet( basedir ), params ); verify( accurev ).chws( basedir, "someOldStream_someUser", "mySnapShot" ); assertThat( result.isSuccess(), is( true ) ); assertThat( result.getRelativePathProjectDirectory(), is( "/project/dir" ) ); }
public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) throws ScmException { return (CheckOutScmResult) execute( repository, fileSet, parameters ); }
AccuRevCheckOutCommand extends AbstractAccuRevExtractSourceCommand { public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) throws ScmException { return (CheckOutScmResult) execute( repository, fileSet, parameters ); } }
AccuRevCheckOutCommand extends AbstractAccuRevExtractSourceCommand { public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) throws ScmException { return (CheckOutScmResult) execute( repository, fileSet, parameters ); } AccuRevCheckOutCommand( ScmLogger logger ); }
AccuRevCheckOutCommand extends AbstractAccuRevExtractSourceCommand { public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) throws ScmException { return (CheckOutScmResult) execute( repository, fileSet, parameters ); } AccuRevCheckOutCommand( ScmLogger logger ); CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
                                       CommandParameters parameters ); static String getWorkSpaceName( File basedir, String basisStream ); }
AccuRevCheckOutCommand extends AbstractAccuRevExtractSourceCommand { public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) throws ScmException { return (CheckOutScmResult) execute( repository, fileSet, parameters ); } AccuRevCheckOutCommand( ScmLogger logger ); CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
                                       CommandParameters parameters ); static String getWorkSpaceName( File basedir, String basisStream );  }