You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2010/01/09 19:23:37 UTC

svn commit: r897510 [5/5] - in /maven/sandbox/trunk/scm: ./ maven-scm-provider-accurevnew/ maven-scm-provider-accurevnew/src/ maven-scm-provider-accurevnew/src/main/ maven-scm-provider-accurevnew/src/main/java/ maven-scm-provider-accurevnew/src/main/ja...

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/checkout/AccuRevCheckoutCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/checkout/AccuRevCheckoutCommandTckTest.java?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/checkout/AccuRevCheckoutCommandTckTest.java (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/checkout/AccuRevCheckoutCommandTckTest.java Sat Jan  9 18:23:30 2010
@@ -0,0 +1,119 @@
+package org.apache.maven.scm.provider.accurev.command.checkout;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.io.InputStream;
+
+import org.apache.maven.scm.provider.accurev.cli.AccuRevJUnitUtil;
+import org.apache.maven.scm.provider.accurev.command.AccuRevTckUtil;
+import org.apache.maven.scm.tck.command.checkout.CheckOutCommandTckTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/**
+ * TODO TckTest does not adhere to repository path return from checkout result. Raise a JIRA to fix that.
+ * 
+ * @author ggardner
+ */
+@RunWith( JUnit4.class )
+public class AccuRevCheckoutCommandTckTest
+    extends CheckOutCommandTckTest
+{
+
+    protected AccuRevTckUtil testUtil = new AccuRevTckUtil();
+
+    @Override
+    protected InputStream getCustomConfiguration()
+        throws Exception
+
+    {
+        return AccuRevJUnitUtil.getPlexusConfiguration();
+    }
+
+    @Override
+    protected File getWorkingCopy()
+    {
+        return testUtil.getWorkingCopy();
+    }
+
+    @Override
+    protected File getAssertionCopy()
+    {
+        return testUtil.getAssertionCopy();
+    }
+
+    @Override
+    protected File getUpdatingCopy()
+    {
+        return testUtil.getUpdatingCopy();
+    }
+
+    @Override
+    public String getScmUrl()
+        throws Exception
+    {
+        return testUtil.getScmUrl();
+    }
+
+    @Override
+    public void initRepo()
+        throws Exception
+    {
+        testUtil.initRepo( getContainer() );
+    }
+
+    @Override
+    @Test
+    public void testCheckOutCommandTest()
+        throws Exception
+    {
+        super.testCheckOutCommandTest();
+    }
+
+    @Override
+    @Before
+    public void setUp()
+        throws Exception
+    {
+        super.setUp();
+    }
+
+    @Override
+    @After
+    public void tearDown()
+        throws Exception
+    {
+        try
+        {
+            testUtil.tearDown();
+            testUtil.removeWorkSpace( getWorkingCopy() );
+
+        }
+        finally
+        {
+            super.tearDown();
+        }
+    }
+
+}

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/checkout/AccuRevCheckoutCommandTckTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/checkout/AccuRevCheckoutCommandTckTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/export/AccuRevExportCommandTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/export/AccuRevExportCommandTest.java?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/export/AccuRevExportCommandTest.java (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/export/AccuRevExportCommandTest.java Sat Jan  9 18:23:30 2010
@@ -0,0 +1,251 @@
+package org.apache.maven.scm.provider.accurev.command.export;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.apache.maven.scm.ScmFileMatcher.*;
+import static org.apache.maven.scm.provider.accurev.AddElementsAction.*;
+import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.*;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.maven.scm.CommandParameter;
+import org.apache.maven.scm.CommandParameters;
+import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.ScmTag;
+import org.apache.maven.scm.command.checkout.CheckOutScmResult;
+import org.apache.maven.scm.command.export.ExportScmResult;
+import org.apache.maven.scm.provider.accurev.AccuRevException;
+import org.apache.maven.scm.provider.accurev.AccuRevScmProvider;
+import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
+import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommandTest;
+import org.apache.maven.scm.repository.ScmRepository;
+import org.jmock.Expectations;
+import org.junit.Test;
+
+public class AccuRevExportCommandTest
+    extends AbstractAccuRevCommandTest
+{
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testExportVersionOutSideWorkspace()
+        throws Exception
+    {
+
+        // info defaults to no workspace...
+        info.setWorkSpace( null );
+
+        context.checking( new Expectations()
+        {
+            {
+
+                one( accurev ).info( with( basedir ) );
+                will( returnValue( info ) );
+
+                one( accurev ).pop( with( basedir ), with( "mySnapShot" ),
+                                    (Collection<File>) with( hasItem( new File( "/./project/dir" ) ) ),
+                                    with( any( List.class ) ) );
+                will( doAll( addElementsTo( 3, new File( "exported/file" ) ), returnValue( true ) ) );
+
+            }
+        } );
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        AccuRevExportCommand command = new AccuRevExportCommand( getLogger() );
+
+        CommandParameters params = new CommandParameters();
+        params.setScmVersion( CommandParameter.SCM_VERSION, new ScmTag( "mySnapShot" ) );
+
+        ExportScmResult result = command.export( repo, new ScmFileSet( basedir ), params );
+
+        context.assertIsSatisfied();
+
+        assertTrue( result.isSuccess() );
+        assertHasScmFile( result.getExportedFiles(), "exported/file", ScmFileStatus.CHECKED_OUT );
+
+    }
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testExportFailure()
+        throws Exception
+    {
+
+        // info defaults to no workspace...
+        info.setWorkSpace( null );
+
+        context.checking( new Expectations()
+        {
+            {
+
+                one( accurev ).info( with( basedir ) );
+                will( returnValue( info ) );
+
+                one( accurev ).pop( with( basedir ), with( "mySnapShot" ),
+                                    (Collection<File>) with( hasItem( new File( "/./project/dir" ) ) ),
+                                    with( any( List.class ) ) );
+                will( returnValue( false ) );
+
+            }
+        } );
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        AccuRevExportCommand command = new AccuRevExportCommand( getLogger() );
+
+        CommandParameters params = new CommandParameters();
+        params.setScmVersion( CommandParameter.SCM_VERSION, new ScmTag( "mySnapShot" ) );
+
+        ExportScmResult result = command.export( repo, new ScmFileSet( basedir ), params );
+
+        context.assertIsSatisfied();
+
+        assertThat( result.isSuccess(), is( false ) );
+        assertThat( result.getProviderMessage(), notNullValue() );
+    }
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testNonPersistentWithinExistingWorkspace()
+        throws Exception
+    {
+
+        // Setup info to return a stream rooted somewhere around here...
+        info.setWorkSpace( "myStream_me" );
+        info.setBasis( "someStream" );
+        info.setTop( basedir.getParent() );
+
+        context.checking( new Expectations()
+        {
+            {
+
+                one( accurev ).info( with( basedir ) );
+                will( returnValue( info ) );
+
+                one( accurev ).stat( basedir );
+                will( returnValue( null ) );
+                inSequence( sequence );
+
+                one( accurev ).rmws( "myStream_me" );
+                will( returnValue( true ) );
+                inSequence( sequence );
+
+                one( accurev ).pop( with( basedir ), with( "mySnapShot" ),
+                                    (Collection<File>) with( hasItem( new File( "/./project/dir" ) ) ),
+                                    with( any( List.class ) ) );
+                will( returnValue( true ) );
+                inSequence( sequence );
+
+                one( accurev ).reactivate( "myStream_me" );
+                will( returnValue( true ) );
+                inSequence( sequence );
+
+            }
+        } );
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+        repo.setPersistCheckout( true );
+
+        AccuRevExportCommand command = new AccuRevExportCommand( getLogger() );
+
+        CommandParameters params = new CommandParameters();
+        params.setScmVersion( CommandParameter.SCM_VERSION, new ScmTag( "mySnapShot" ) );
+
+        ExportScmResult result = command.export( repo, new ScmFileSet( basedir ), params );
+
+        context.assertIsSatisfied();
+
+        assertTrue( result.isSuccess() );
+        // TODO - raise JIRA to move relative path dir to repository rather than checkout result
+        // dassertThat( result.getRelativePathProjectDirectory(), is( "/project/dir" ) );
+
+    }
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testNonPersistentCheckoutUsesExport()
+        // This is same expectations as above, but using checkout method with setPersist = false.
+        throws AccuRevException, ScmException
+    {
+        // Setup info to return a stream rooted somewhere around here...
+        info.setWorkSpace( "myStream_me" );
+        info.setBasis( "someStream" );
+        info.setTop( basedir.getParent() );
+
+        context.checking( new Expectations()
+        {
+            {
+
+                one( accurev ).info( with( basedir ) );
+                will( returnValue( info ) );
+
+                one( accurev ).stat( basedir );
+                will( returnValue( null ) );
+                inSequence( sequence );
+
+                one( accurev ).rmws( "myStream_me" );
+                will( returnValue( true ) );
+                inSequence( sequence );
+
+                one( accurev ).pop( with( basedir ), with( "mySnapShot" ),
+                                    (Collection<File>) with( hasItem( new File( "/./project/dir" ) ) ),
+                                    with( any( List.class ) ) );
+                will( returnValue( true ) );
+                inSequence( sequence );
+
+                one( accurev ).reactivate( "myStream_me" );
+                will( returnValue( true ) );
+                inSequence( sequence );
+
+            }
+        } );
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+        repo.setPersistCheckout( false );
+
+        ScmRepository scmRepo = new ScmRepository( "accurev", repo );
+
+        AccuRevScmProvider provider = new AccuRevScmProvider();
+        CheckOutScmResult result = provider.checkOut( scmRepo, new ScmFileSet( basedir ), new ScmTag( "mySnapShot" ) );
+
+        context.assertIsSatisfied();
+
+        assertTrue( result.isSuccess() );
+
+    }
+}

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/export/AccuRevExportCommandTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/export/AccuRevExportCommandTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/remove/AccuRevRemoveCommandTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/remove/AccuRevRemoveCommandTest.java?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/remove/AccuRevRemoveCommandTest.java (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/remove/AccuRevRemoveCommandTest.java Sat Jan  9 18:23:30 2010
@@ -0,0 +1,115 @@
+package org.apache.maven.scm.provider.accurev.command.remove;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.apache.maven.scm.ScmFileMatcher.*;
+import static org.apache.maven.scm.provider.accurev.AddElementsAction.*;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.List;
+
+import org.apache.maven.scm.CommandParameter;
+import org.apache.maven.scm.CommandParameters;
+import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.command.remove.RemoveScmResult;
+import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
+import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommandTest;
+import org.jmock.Expectations;
+import org.junit.Test;
+
+public class AccuRevRemoveCommandTest
+    extends AbstractAccuRevCommandTest
+{
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testRemove()
+        throws Exception
+    {
+        final ScmFileSet testFileSet = new ScmFileSet( basedir, new File( "src/main/java/Foo.java" ) );
+
+        context.checking( new Expectations()
+        {
+            {
+                one( accurev ).defunct( with( basedir ), with( testFileSet.getFileList() ), with( "A deleted file" ),
+                                        with( any( List.class ) ) );
+                will( doAll( addElementsTo( 3, new File( "removed/file" ) ), returnValue( true ) ) );
+                inSequence( sequence );
+
+            }
+        } );
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        AccuRevRemoveCommand command = new AccuRevRemoveCommand( getLogger() );
+
+        CommandParameters commandParameters = new CommandParameters();
+        commandParameters.setString( CommandParameter.MESSAGE, "A deleted file" );
+        RemoveScmResult result = command.remove( repo, testFileSet, commandParameters );
+
+        context.assertIsSatisfied();
+
+        assertThat( result.isSuccess(), is( true ) );
+        assertThat( result.getRemovedFiles().size(), is( 1 ) );
+        assertHasScmFile( result.getRemovedFiles(), "removed/file", ScmFileStatus.DELETED );
+    }
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testAddFailed()
+        throws Exception
+    {
+        final ScmFileSet testFileSet = new ScmFileSet( basedir, new File( "src/main/java/Foo.java" ) );
+
+        context.checking( new Expectations()
+        {
+            {
+                one( accurev ).defunct( with( basedir ), with( testFileSet.getFileList() ), with( "A deleted file" ),
+                                        with( any( List.class ) ) );
+                will( returnValue( false )  );
+                inSequence( sequence );
+
+            }
+        } );
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        AccuRevRemoveCommand command = new AccuRevRemoveCommand( getLogger() );
+
+        CommandParameters commandParameters = new CommandParameters();
+        commandParameters.setString( CommandParameter.MESSAGE, "A deleted file" );
+        RemoveScmResult result = command.remove( repo, testFileSet, commandParameters );
+
+        context.assertIsSatisfied();
+
+        assertThat( result.isSuccess(), is( false ) );
+        assertThat( result.getProviderMessage(), notNullValue() );
+    }
+
+}

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/remove/AccuRevRemoveCommandTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/remove/AccuRevRemoveCommandTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTckTest.java?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTckTest.java (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTckTest.java Sat Jan  9 18:23:30 2010
@@ -0,0 +1,115 @@
+package org.apache.maven.scm.provider.accurev.command.status;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.io.InputStream;
+
+import org.apache.maven.scm.provider.accurev.cli.AccuRevJUnitUtil;
+import org.apache.maven.scm.provider.accurev.command.AccuRevTckUtil;
+import org.apache.maven.scm.tck.command.status.StatusCommandTckTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith( JUnit4.class )
+public class AccuRevStatusCommandTckTest
+    extends StatusCommandTckTest
+{
+
+    private AccuRevTckUtil accurevTckTestUtil = new AccuRevTckUtil();
+
+    @Override
+    @Test
+    public void testStatusCommand()
+        throws Exception
+    {
+        super.testStatusCommand();
+    }
+
+    @Override
+    @Before
+    public void setUp()
+        throws Exception
+    {
+        super.setUp();
+    }
+
+    @Override
+    protected File getWorkingCopy()
+    {
+        return accurevTckTestUtil.getWorkingCopy();
+    }
+
+    @Override
+    protected File getAssertionCopy()
+    {
+        return accurevTckTestUtil.getAssertionCopy();
+    }
+
+    @Override
+    protected File getUpdatingCopy()
+    {
+        return accurevTckTestUtil.getUpdatingCopy();
+    }
+
+    @Override
+    public String getScmUrl()
+        throws Exception
+    {
+        return accurevTckTestUtil.getScmUrl();
+    }
+
+    @Override
+    public void initRepo()
+        throws Exception
+    {
+        accurevTckTestUtil.initRepo( getContainer() );
+    }
+
+    @Override
+    protected InputStream getCustomConfiguration()
+        throws Exception
+
+    {
+        return AccuRevJUnitUtil.getPlexusConfiguration();
+    }
+
+    @Override
+    @After
+    public void tearDown()
+        throws Exception
+    {
+        try
+        {
+            accurevTckTestUtil.tearDown();
+            accurevTckTestUtil.removeWorkSpace( getWorkingCopy() );
+            accurevTckTestUtil.removeWorkSpace( getUpdatingCopy() );
+
+        }
+        finally
+        {
+            super.tearDown();
+        }
+    }
+
+}

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTckTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTckTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTest.java?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTest.java (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTest.java Sat Jan  9 18:23:30 2010
@@ -0,0 +1,165 @@
+package org.apache.maven.scm.provider.accurev.command.status;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.apache.maven.scm.ScmFileMatcher.*;
+import static org.apache.maven.scm.provider.accurev.AddElementsAction.*;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.maven.scm.CommandParameters;
+import org.apache.maven.scm.ScmFile;
+import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.command.status.StatusScmResult;
+import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
+import org.apache.maven.scm.provider.accurev.AccuRevStat;
+import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommandTest;
+import org.jmock.Expectations;
+import org.junit.Test;
+
+public class AccuRevStatusCommandTest
+    extends AbstractAccuRevCommandTest
+{
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testStatus()
+        throws Exception
+    {
+
+        final ScmFileSet testFileSet = getScmFileSet();
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        context.checking( new Expectations()
+        {
+            {
+                File keptFile = new File( "kept/file" );
+                File keptAdded = new File( "kept/added" );
+                // this is the special one, it is returned by both the kept and defunct stat calls, so the command
+                // needs to filter it out.
+                File keptDefunct = new File( "kept/defunct" );
+                File modifiedFile = new File( "modified/file" );
+                File modifiedAdded = new File( "modified/added" );
+                File missingFile = new File( "missing/file" );
+                File externalFile = new File( "external/file" );
+
+                one( accurev ).stat( with( basedir ), with( testFileSet.getFileList() ), with( AccuRevStat.DEFUNCT ),
+                                     with( any( List.class ) ) );
+                will( doAll( addElementsTo( 3, keptDefunct ), returnValue( true ) ) );
+
+                one( accurev ).stat( with( basedir ), with( testFileSet.getFileList() ), with( AccuRevStat.MODIFIED ),
+                                     with( any( List.class ) ) );
+                will( doAll( addElementsTo( 3, modifiedFile, modifiedAdded ), returnValue( true ) ) );
+
+                one( accurev ).stat( with( basedir ), with( testFileSet.getFileList() ), with( AccuRevStat.KEPT ),
+                                     with( any( List.class ) ) );
+                will( doAll( addElementsTo( 3, keptDefunct, keptFile, keptAdded ), returnValue( true ) ) );
+
+                one( accurev ).stat( with( basedir ), with( testFileSet.getFileList() ), with( AccuRevStat.MISSING ),
+                                     with( any( List.class ) ) );
+                will( doAll( addElementsTo( 3, missingFile ), returnValue( true ) ) );
+
+                one( accurev ).stat( with( basedir ), with( testFileSet.getFileList() ), with( AccuRevStat.EXTERNAL ),
+                                     with( any( List.class ) ) );
+                will( doAll( addElementsTo( 3, externalFile ), returnValue( true ) ) );
+
+                one( accurev ).statBackingStream(
+                                                  with( basedir ),
+                                                  (Collection<File>) with( allOf( hasItems( modifiedFile,
+                                                                                            modifiedAdded, keptFile,
+                                                                                            keptAdded ),
+                                                                                  not( hasItem( keptDefunct ) ) ) ),
+                                                  with( any( List.class ) ), with( any( List.class ) ) );
+                will( doAll( addElementsTo( 2, modifiedFile, keptFile ), addElementsTo( 3, modifiedAdded, keptAdded ),
+                             returnValue( true ) ) );
+
+            }
+        } );
+
+        AccuRevStatusCommand command = new AccuRevStatusCommand( getLogger() );
+
+        CommandParameters commandParameters = new CommandParameters();
+        StatusScmResult result = command.status( repo, testFileSet, commandParameters );
+
+        context.assertIsSatisfied();
+
+        assertThat( result.isSuccess(), is( true ) );
+        assertThat( result.getChangedFiles().size(), is( 7 ) );
+        // Note the case.. without compiles under Eclipse but not sun JDK
+        assertThat( (List<ScmFile>) result.getChangedFiles(), not( hasItem( scmFile( "kept/defunct",
+                                                                                     ScmFileStatus.MODIFIED ) ) ) );
+        assertHasScmFile( result.getChangedFiles(), "kept/file", ScmFileStatus.MODIFIED );
+        assertHasScmFile( result.getChangedFiles(), "kept/added", ScmFileStatus.ADDED );
+        assertHasScmFile( result.getChangedFiles(), "kept/defunct", ScmFileStatus.DELETED );
+        assertHasScmFile( result.getChangedFiles(), "modified/file", ScmFileStatus.MODIFIED );
+        assertHasScmFile( result.getChangedFiles(), "modified/added", ScmFileStatus.ADDED );
+        assertHasScmFile( result.getChangedFiles(), "missing/file", ScmFileStatus.MISSING );
+        assertHasScmFile( result.getChangedFiles(), "external/file", ScmFileStatus.UNKNOWN );
+
+    }
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testFailure()
+        throws Exception
+    {
+
+        final ScmFileSet testFileSet = getScmFileSet();
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        context.checking( new Expectations()
+        {
+            {
+                one( accurev ).stat( with( basedir ), with( testFileSet.getFileList() ), with( AccuRevStat.MODIFIED ),
+                                     with( any( List.class ) ) );
+                will( returnValue( false ) );
+
+                atMost( 4 ).of( accurev ).stat( with( basedir ), with( testFileSet.getFileList() ),
+                                                with( any( AccuRevStat.class ) ), with( any( List.class ) ) );
+                will( returnValue( true ) );
+            }
+        } );
+
+        AccuRevStatusCommand command = new AccuRevStatusCommand( getLogger() );
+
+        CommandParameters commandParameters = new CommandParameters();
+        StatusScmResult result = command.status( repo, testFileSet, commandParameters );
+
+        context.assertIsSatisfied();
+
+        assertThat( result.isSuccess(), is( false ) );
+        assertThat( result.getProviderMessage(), notNullValue() );
+
+    }
+
+}

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/status/AccuRevStatusCommandTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTckTest.java?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTckTest.java (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTckTest.java Sat Jan  9 18:23:30 2010
@@ -0,0 +1,150 @@
+package org.apache.maven.scm.provider.accurev.command.tag;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.io.InputStream;
+
+import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmTag;
+import org.apache.maven.scm.command.checkin.CheckInScmResult;
+import org.apache.maven.scm.command.checkout.CheckOutScmResult;
+import org.apache.maven.scm.command.tag.TagScmResult;
+import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
+import org.apache.maven.scm.provider.accurev.cli.AccuRevJUnitUtil;
+import org.apache.maven.scm.provider.accurev.command.AccuRevTckUtil;
+import org.apache.maven.scm.repository.ScmRepository;
+import org.apache.maven.scm.tck.command.tag.TagCommandTckTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith( JUnit4.class )
+public class AccuRevTagCommandTckTest
+    extends TagCommandTckTest
+{
+
+    private AccuRevTckUtil accurevTckTestUtil = new AccuRevTckUtil();
+
+    @Override
+    protected InputStream getCustomConfiguration()
+        throws Exception
+
+    {
+        return AccuRevJUnitUtil.getPlexusConfiguration();
+    }
+
+    @Override
+    @Test
+    public void testTagCommandTest()
+        throws Exception
+    {
+        super.testTagCommandTest();
+    }
+
+    @Override
+    @Before
+    public void setUp()
+        throws Exception
+    {
+        super.setUp();
+    }
+
+    @Test
+    public void testReleasePluginStyleTagThenCheckout()
+        throws Exception
+    {
+
+        String tag = "test-tag";
+
+        makeFile( getWorkingCopy(), ".acignore", "target/*\ntarget\n" );
+
+        ScmRepository scmRepository = getScmRepository();
+
+        addToWorkingTree( getWorkingCopy(), new File( ".acignore" ), scmRepository );
+
+        CheckInScmResult checkinResult =
+            getScmManager().checkIn( scmRepository, new ScmFileSet( getWorkingCopy() ), "add acignore" );
+
+        assertResultIsSuccess( checkinResult );
+
+        TagScmResult tagResult =
+            getScmManager().getProviderByUrl( getScmUrl() ).tag( scmRepository, new ScmFileSet( getWorkingCopy() ), tag );
+
+        assertResultIsSuccess( tagResult );
+
+        scmRepository.getProviderRepository().setPersistCheckout( false );
+
+        CheckOutScmResult checkoutResult =
+            getScmManager().checkOut( scmRepository, new ScmFileSet( new File( getWorkingCopy(), "target/checkout" ) ),
+                                      new ScmTag( tag ) );
+
+        assertResultIsSuccess( checkoutResult );
+
+    }
+
+    @Override
+    protected File getWorkingCopy()
+    {
+        return accurevTckTestUtil.getWorkingCopy();
+    }
+
+    @Override
+    protected File getAssertionCopy()
+    {
+        return accurevTckTestUtil.getAssertionCopy();
+    }
+
+    @Override
+    public String getScmUrl()
+        throws Exception
+    {
+        return accurevTckTestUtil.getScmUrl();
+    }
+
+    @Override
+    public void initRepo()
+        throws Exception
+    {
+        accurevTckTestUtil.initRepo( getContainer() );
+        System.setProperty( AccuRevScmProviderRepository.TAG_PREFIX, accurevTckTestUtil.getDepotName() + "_" );
+    }
+
+    @Override
+    @After
+    public void tearDown()
+        throws Exception
+    {
+        try
+        {
+            accurevTckTestUtil.tearDown();
+            accurevTckTestUtil.removeWorkSpace( getWorkingCopy() );
+            accurevTckTestUtil.removeWorkSpace( getAssertionCopy() );
+
+        }
+        finally
+        {
+            System.clearProperty( AccuRevScmProviderRepository.TAG_PREFIX );
+            super.tearDown();
+        }
+    }
+}

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTckTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTckTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTest.java?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTest.java (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTest.java Sat Jan  9 18:23:30 2010
@@ -0,0 +1,136 @@
+package org.apache.maven.scm.provider.accurev.command.tag;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.apache.maven.scm.ScmFileMatcher.*;
+import static org.apache.maven.scm.provider.accurev.AddElementsAction.*;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.List;
+
+import org.apache.maven.scm.CommandParameter;
+import org.apache.maven.scm.CommandParameters;
+import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.command.tag.TagScmResult;
+import org.apache.maven.scm.provider.accurev.AccuRevInfo;
+import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
+import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommandTest;
+import org.jmock.Expectations;
+import org.junit.Test;
+
+public class AccuRevTagCommandTest
+    extends AbstractAccuRevCommandTest
+{
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testTag()
+        throws Exception
+    {
+        final ScmFileSet testFileSet = new ScmFileSet( new File( "/my/workspace/project/dir" ) );
+        final File basedir = testFileSet.getBasedir();
+
+        final String basisStream = "basisStream";
+        final AccuRevInfo info = new AccuRevInfo( basedir );
+        info.setBasis( basisStream );
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        context.checking( new Expectations()
+        {
+            {
+                one( accurev ).info( with( basedir ) );
+                will( returnValue( info ) );
+                inSequence( sequence );
+
+                one( accurev ).mksnap( with( "theTagName" ), with( basisStream ) );
+                will( returnValue( true ) );
+                inSequence( sequence );
+
+                one( accurev ).statTag( with( "theTagName" ), with( any( List.class ) ) );
+                will( doAll( addElementsTo( 1, new File( "tagged/file" ) ), returnValue( true ) ) );
+
+            }
+        } );
+
+        AccuRevTagCommand command = new AccuRevTagCommand( getLogger() );
+
+        CommandParameters commandParameters = new CommandParameters();
+        commandParameters.setString( CommandParameter.TAG_NAME, "theTagName" );
+        TagScmResult result = command.tag( repo, testFileSet, commandParameters );
+
+        context.assertIsSatisfied();
+
+        assertThat( result.isSuccess(), is( true ) );
+        assertThat( result.getTaggedFiles().size(), is( 1 ) );
+        assertHasScmFile( result.getTaggedFiles(), "tagged/file", ScmFileStatus.TAGGED );
+
+    }
+
+    @Test
+    public void testAccuRevError()
+        throws Exception
+    {
+        final ScmFileSet testFileSet = new ScmFileSet( new File( "/my/workspace/project/dir" ) );
+        final File basedir = testFileSet.getBasedir();
+
+        final String basisStream = "basisStream";
+        final AccuRevInfo info = new AccuRevInfo( basedir );
+        info.setBasis( basisStream );
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        context.checking( new Expectations()
+        {
+            {
+                one( accurev ).info( with( basedir ) );
+                will( returnValue( info ) );
+                inSequence( sequence );
+
+                one( accurev ).mksnap( with( "theTagName" ), with( basisStream ) );
+                will( returnValue( false ) );
+                inSequence( sequence );
+
+            }
+        } );
+
+        AccuRevTagCommand command = new AccuRevTagCommand( getLogger() );
+
+        CommandParameters commandParameters = new CommandParameters();
+        commandParameters.setString( CommandParameter.TAG_NAME, "theTagName" );
+        TagScmResult result = command.tag( repo, testFileSet, commandParameters );
+
+        context.assertIsSatisfied();
+
+        assertThat( result.isSuccess(), is( false ) );
+        assertThat( result.getProviderMessage(), notNullValue() );
+
+    }
+
+}

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/tag/AccuRevTagCommandTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateCommandTckTest.java?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateCommandTckTest.java (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateCommandTckTest.java Sat Jan  9 18:23:30 2010
@@ -0,0 +1,109 @@
+package org.apache.maven.scm.provider.accurev.command.update;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.io.InputStream;
+
+import org.apache.maven.scm.provider.accurev.cli.AccuRevJUnitUtil;
+import org.apache.maven.scm.provider.accurev.command.AccuRevTckUtil;
+import org.apache.maven.scm.tck.command.update.UpdateCommandTckTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith( JUnit4.class )
+public class AccuRevUpdateCommandTckTest
+    extends UpdateCommandTckTest
+{
+
+    private AccuRevTckUtil accurevTckTestUtil = new AccuRevTckUtil();
+
+    @Override
+    protected InputStream getCustomConfiguration()
+        throws Exception
+
+    {
+        return AccuRevJUnitUtil.getPlexusConfiguration();
+    }
+
+    @Override
+    @Test
+    public void testUpdateCommand()
+        throws Exception
+    {
+        super.testUpdateCommand();
+    }
+
+    @Override
+    @Before
+    public void setUp()
+        throws Exception
+    {
+        super.setUp();
+    }
+
+    @Override
+    protected File getWorkingCopy()
+    {
+        return accurevTckTestUtil.getWorkingCopy();
+    }
+
+    @Override
+    protected File getUpdatingCopy()
+    {
+        return accurevTckTestUtil.getUpdatingCopy();
+    }
+
+    @Override
+    public String getScmUrl()
+        throws Exception
+    {
+        return accurevTckTestUtil.getScmUrl();
+    }
+
+    @Override
+    public void initRepo()
+        throws Exception
+    {
+        accurevTckTestUtil.initRepo( getContainer() );
+    }
+
+    @Override
+    @After
+    public void tearDown()
+        throws Exception
+    {
+        try
+        {
+            accurevTckTestUtil.tearDown();
+            accurevTckTestUtil.removeWorkSpace( getWorkingCopy() );
+            accurevTckTestUtil.removeWorkSpace( getUpdatingCopy() );
+
+        }
+        finally
+        {
+            super.tearDown();
+        }
+    }
+
+}

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateCommandTckTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccuRevUpdateCommandTckTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccurevUpdateCommandTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccurevUpdateCommandTest.java?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccurevUpdateCommandTest.java (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccurevUpdateCommandTest.java Sat Jan  9 18:23:30 2010
@@ -0,0 +1,183 @@
+package org.apache.maven.scm.provider.accurev.command.update;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.apache.maven.scm.ScmFileMatcher.*;
+import static org.apache.maven.scm.provider.accurev.AddElementsAction.*;
+import static org.apache.maven.scm.provider.accurev.PutMapEntryAction.*;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.scm.CommandParameter;
+import org.apache.maven.scm.CommandParameters;
+import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.command.update.UpdateScmResult;
+import org.apache.maven.scm.provider.accurev.AccuRevScmProviderRepository;
+import org.apache.maven.scm.provider.accurev.WorkSpace;
+import org.apache.maven.scm.provider.accurev.command.AbstractAccuRevCommandTest;
+import org.hamcrest.core.IsInstanceOf;
+import org.jmock.Expectations;
+import org.junit.Test;
+
+public class AccurevUpdateCommandTest
+    extends AbstractAccuRevCommandTest
+{
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testUpdate()
+        throws Exception
+    {
+        final ScmFileSet testFileSet = new ScmFileSet( new File( "/my/workspace/project/dir" ) );
+        final File basedir = testFileSet.getBasedir();
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        info.setWorkSpace( "theWorkSpace" );
+
+        context.checking( new Expectations()
+        {
+            {
+                File keptFile = new File( "updated/file" );
+                File keptAdded = new File( "new/file" );
+
+                one( accurev ).info( basedir );
+                will( returnValue( info ) );
+
+                // TODO Should test that the timeSpec parameter is a formatted date
+                one( accurev ).update( with( basedir ), with( any( String.class ) ), with( any( List.class ) ) );
+                will( doAll( addElementsTo( 2, keptFile, keptAdded ), returnValue( true ) ) );
+
+            }
+        } );
+
+        AccuRevUpdateCommand command = new AccuRevUpdateCommand( getLogger() );
+
+        CommandParameters commandParameters = new CommandParameters();
+        commandParameters.setString( CommandParameter.RUN_CHANGELOG_WITH_UPDATE, Boolean.toString( false ) );
+        UpdateScmResult result = command.update( repo, testFileSet, commandParameters );
+
+        context.assertIsSatisfied();
+
+        assertThat( result.isSuccess(), is( true ) );
+        assertThat( result.getUpdatedFiles().size(), is( 2 ) );
+        assertHasScmFile( result.getUpdatedFiles(), "updated/file", ScmFileStatus.UPDATED );
+        assertHasScmFile( result.getUpdatedFiles(), "new/file", ScmFileStatus.UPDATED );
+
+    }
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testUpdateWithChangeLog()
+        throws Exception
+    {
+        final ScmFileSet testFileSet = new ScmFileSet( new File( "/my/workspace/project/dir" ) );
+        final File basedir = testFileSet.getBasedir();
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        info.setWorkSpace( "theWorkSpace" );
+        info.setBasis( "myStream" );
+        context.checking( new Expectations()
+        {
+            {
+                WorkSpace wsBefore = new WorkSpace( "theWorkSpace", 123 );
+
+                one( accurev ).info( basedir );
+                will( returnValue( info ) );
+
+                one( accurev ).showWorkSpaces( with( any( Map.class ) ) );
+                will( doAll( putEntryTo( 0, "theWorkSpace", wsBefore ), returnValue( true ) ) );
+
+                one( accurev ).update( with( basedir ), with( any( String.class ) ), with( any( List.class ) ) );
+                will( returnValue( true ) );
+
+            }
+        } );
+
+        AccuRevUpdateCommand command = new AccuRevUpdateCommand( getLogger() );
+
+        CommandParameters commandParameters = new CommandParameters();
+        commandParameters.setString( CommandParameter.RUN_CHANGELOG_WITH_UPDATE, Boolean.toString( true ) );
+        UpdateScmResult result = command.update( repo, testFileSet, commandParameters );
+
+        context.assertIsSatisfied();
+
+        assertThat( result.isSuccess(), is( true ) );
+        assertThat( result, IsInstanceOf.instanceOf( AccuRevUpdateScmResult.class ) );
+        AccuRevUpdateScmResult accuRevResult = (AccuRevUpdateScmResult) result;
+        assertThat( accuRevResult.getFromVersion().getTimeSpec(), is( "124" ) );
+        assertThat( accuRevResult.getToVersion().getTimeSpec(), nullValue() );
+
+    }
+
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testAccuRevFailure()
+        throws Exception
+    {
+        final ScmFileSet testFileSet = new ScmFileSet( new File( "/my/workspace/project/dir" ) );
+        final File basedir = testFileSet.getBasedir();
+
+        AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
+        repo.setStreamName( "myStream" );
+        repo.setAccuRev( accurev );
+        repo.setProjectPath( "/project/dir" );
+
+        info.setWorkSpace( "theWorkSpace" );
+
+        context.checking( new Expectations()
+        {
+            {
+                File keptFile = new File( "updated/file" );
+                File keptAdded = new File( "new/file" );
+                one( accurev ).info( basedir );
+                will( returnValue( info ) );
+
+                one( accurev ).update( with( basedir ), with( any( String.class ) ), with( any( List.class ) ) );
+                will( doAll( addElementsTo( 2, keptFile, keptAdded ), returnValue( false ) ) );
+
+            }
+        } );
+
+        AccuRevUpdateCommand command = new AccuRevUpdateCommand( getLogger() );
+
+        CommandParameters commandParameters = new CommandParameters();
+        commandParameters.setString( CommandParameter.RUN_CHANGELOG_WITH_UPDATE, Boolean.toString( false ) );
+        UpdateScmResult result = command.update( repo, testFileSet, commandParameters );
+
+        context.assertIsSatisfied();
+
+        assertThat( result.isSuccess(), is( false ) );
+        assertThat( result.getProviderMessage(), notNullValue() );
+
+    }
+}

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccurevUpdateCommandTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/java/org/apache/maven/scm/provider/accurev/command/update/AccurevUpdateCommandTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/PlexusTestContainerConfig.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/PlexusTestContainerConfig.xml?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/PlexusTestContainerConfig.xml (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/PlexusTestContainerConfig.xml Sat Jan  9 18:23:30 2010
@@ -0,0 +1,19 @@
+
+	<!--
+		Override the configuration that is used by the PlexusTestCase to
+		create a Container instance
+	-->
+<plexus>
+	<components>
+		<component>
+			<role>org.codehaus.plexus.logging.LoggerManager
+			</role>
+			<implementation>
+				org.codehaus.plexus.logging.console.ConsoleLoggerManager
+			</implementation>
+			<configuration>
+				<threshold>DEBUG</threshold>
+			</configuration>
+		</component>
+	</components>
+</plexus>
\ No newline at end of file

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/elementHistory.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/elementHistory.xml?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/elementHistory.xml (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/elementHistory.xml Sat Jan  9 18:23:30 2010
@@ -0,0 +1,240 @@
+              <AcResponse
+    Command="hist"
+    TaskId="1699">
+  <element
+      name="/tcktests/pom.xml"
+      id="4">
+    <transaction
+        id="23"
+        type="purge"
+        time="1232091773"
+        user="ggardner">
+      <version
+          virtual="2/4"
+          real="2/4"
+          virtualNamedVersion="maventst_ggardner/4"
+          realNamedVersion="maventst_ggardner/4"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="20"
+        type="defunct"
+        time="1231404886"
+        user="ggardner">
+      <version
+          virtual="2/4"
+          real="2/4"
+          virtualNamedVersion="maventst_ggardner/4"
+          realNamedVersion="maventst_ggardner/4"
+          ancestor="2/1"
+          ancestorNamedVersion="maventst_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="19"
+        type="purge"
+        time="1231404728"
+        user="ggardner">
+      <version
+          virtual="2/3"
+          real="2/3"
+          virtualNamedVersion="maventst_ggardner/3"
+          realNamedVersion="maventst_ggardner/3"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="17"
+        type="defunct"
+        time="1231325495"
+        user="ggardner">
+      <version
+          virtual="2/3"
+          real="2/3"
+          virtualNamedVersion="maventst_ggardner/3"
+          realNamedVersion="maventst_ggardner/3"
+          ancestor="2/1"
+          ancestorNamedVersion="maventst_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="16"
+        type="purge"
+        time="1231324133"
+        user="ggardner">
+      <version
+          virtual="2/2"
+          real="2/2"
+          virtualNamedVersion="maventst_ggardner/2"
+          realNamedVersion="maventst_ggardner/2"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="15"
+        type="defunct"
+        time="1231324113"
+        user="ggardner">
+      <version
+          virtual="2/2"
+          real="2/2"
+          virtualNamedVersion="maventst_ggardner/2"
+          realNamedVersion="maventst_ggardner/2"
+          ancestor="2/1"
+          ancestorNamedVersion="maventst_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="9"
+        type="promote"
+        time="1230878798"
+        user="ggardner">
+      <version
+          virtual="1/1"
+          real="2/1"
+          virtualNamedVersion="maventst/1"
+          realNamedVersion="maventst_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="8"
+        type="add"
+        time="1230878780"
+        user="ggardner">
+      <version
+          virtual="2/1"
+          real="2/1"
+          virtualNamedVersion="maventst_ggardner/1"
+          realNamedVersion="maventst_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+  </element>
+  <element
+      name="/tcktests/hello.world"
+      id="9">
+    <transaction
+        id="49"
+        type="purge"
+        time="1233782813"
+        user="ggardner">
+      <version
+          virtual="2/2"
+          real="2/2"
+          virtualNamedVersion="maventst_ggardner/2"
+          realNamedVersion="maventst_ggardner/2"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="30"
+        type="promote"
+        time="1232654731"
+        user="ggardner">
+      <comment>hpromoting</comment>
+      <version
+          virtual="1/2"
+          real="6/1"
+          virtualNamedVersion="maventst/2"
+          realNamedVersion="maventst_checkout2_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="29"
+        type="promote"
+        time="1232654715"
+        user="ggardner">
+      <comment>hpromoting</comment>
+      <version
+          virtual="3/1"
+          real="6/1"
+          virtualNamedVersion="maventst_checkout/1"
+          realNamedVersion="maventst_checkout2_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="28"
+        type="keep"
+        time="1232654701"
+        user="ggardner">
+      <comment></comment>
+      <version
+          virtual="6/1"
+          real="6/1"
+          virtualNamedVersion="maventst_checkout2_ggardner/1"
+          realNamedVersion="maventst_checkout2_ggardner/1"
+          ancestor="2/1"
+          ancestorNamedVersion="maventst_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="25"
+        type="defunct"
+        time="1232654485"
+        user="ggardner">
+      <comment>defuncting</comment>
+      <version
+          virtual="2/2"
+          real="2/2"
+          virtualNamedVersion="maventst_ggardner/2"
+          realNamedVersion="maventst_ggardner/2"
+          ancestor="2/1"
+          ancestorNamedVersion="maventst_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="22"
+        type="promote"
+        time="1231408634"
+        user="ggardner">
+      <version
+          virtual="1/1"
+          real="2/1"
+          virtualNamedVersion="maventst/1"
+          realNamedVersion="maventst_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+    <transaction
+        id="21"
+        type="add"
+        time="1231408622"
+        user="ggardner">
+      <comment>hello world</comment>
+      <version
+          virtual="2/1"
+          real="2/1"
+          virtualNamedVersion="maventst_ggardner/1"
+          realNamedVersion="maventst_ggardner/1"
+          elem_type="text"
+          dir="no"/>
+    </transaction>
+  </element>
+  <streams>
+    <stream
+        id="1"
+        name="maventst"
+        type="normal"/>
+    <stream
+        id="2"
+        name="maventst_ggardner"
+        type="workspace"/>
+    <stream
+        id="3"
+        name="maventst_checkout"
+        type="normal"/>
+    <stream
+        id="6"
+        name="maventst_checkout2_ggardner"
+        type="workspace"/>
+  </streams>
+</AcResponse>

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.inworkspace.txt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.inworkspace.txt?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.inworkspace.txt (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.inworkspace.txt Sat Jan  9 18:23:30 2010
@@ -0,0 +1,13 @@
+Shell:		/bin/bash
+Principal:	ggardner
+Host:		poppix3
+Domain:		(none)
+Server name:	poppix3
+Port:		5050
+ACCUREV_BIN:	/usr/local/accurev/bin
+Client time:	2009/01/01 23:17:52 EST (1230812272)
+Server time:	2009/01/01 23:17:52 EST (1230812272)
+Depot:		maventst
+Workspace/ref:	maventst_ggardner
+Basis:		maventst
+Top:		/home/ggardner/accurev/ws/maventst

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.inworkspace.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.inworkspace.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.outsideworkspace.txt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.outsideworkspace.txt?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.outsideworkspace.txt (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.outsideworkspace.txt Sat Jan  9 18:23:30 2010
@@ -0,0 +1,9 @@
+Shell:		/bin/bash
+Principal:	ggardner
+Host:		poppix3
+Domain:		(none)
+Server name:	poppix3
+Port:		5050
+ACCUREV_BIN:	/usr/local/accurev/bin
+Client time:	2009/01/01 23:18:13 EST (1230812293)
+Server time:	2009/01/01 23:18:13 EST (1230812293)

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.outsideworkspace.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/info.outsideworkspace.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/showrefs.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/showrefs.xml?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/showrefs.xml (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/showrefs.xml Sat Jan  9 18:23:30 2010
@@ -0,0 +1,17 @@
+<AcResponse
+    Command="show refs"
+    TaskId="2772">
+  <Element
+      Name="maven-scm-INT-reftree"
+      Storage="/home/ggardner/accurev/ws/maven-scm-INT-reftree"
+      Host="theHost"
+      Stream="3"
+      depot="maven-scm"
+      Target_trans="12"
+      Trans="12"
+      fileModTime="0"
+      Type="3"
+      EOL="0"
+      user_id="1"
+      user_name="ggardner"/>
+</AcResponse>

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/showworkspaces.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/showworkspaces.xml?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/showworkspaces.xml (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/showworkspaces.xml Sat Jan  9 18:23:30 2010
@@ -0,0 +1,17 @@
+<AcResponse
+    Command="show wspaces"
+    TaskId="2773">
+  <Element
+      Name="maventst_ggardner"
+      Storage="/home/ggardner/accurev/ws/maventst"
+      Host="aHost"
+      Stream="2"
+      depot="maventst"
+      Target_trans="51"
+      Trans="49"
+      fileModTime="1233782816"
+      Type="1"
+      EOL="0"
+      user_id="1"
+      user_name="ggardner"/>
+</AcResponse>

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.backed.txt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.backed.txt?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.backed.txt (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.backed.txt Sat Jan  9 18:23:30 2010
@@ -0,0 +1,8 @@
+<AcResponse>
+	<Command name="stat"/>
+	<Element path="/./tcktest/pom.xml"
+			version="2/1"
+	         namedVersion="maventst/1"
+	         status="(backed)"
+	 />      
+</AcResponse>

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.backed.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.backed.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.backed.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.backed.xml?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.backed.xml (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.backed.xml Sat Jan  9 18:23:30 2010
@@ -0,0 +1,17 @@
+<AcResponse
+    Command="stat"
+    Directory="/home/ggardner/accurev/ws/maventst/tcktests"
+    TaskId="1008">
+  <element
+      location="/./tcktests/pom.xml"
+      dir="no"
+      id="4"
+      elemType="text"
+      size="0"
+      modTime="1232315644"
+      hierType="parallel"
+      Virtual="1/1"
+      namedVersion="maventst/1"
+      Real="2/1"
+      status="(backed)"/>
+</AcResponse>

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.ignored.txt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.ignored.txt?rev=897510&view=auto
==============================================================================
    (empty)

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.ignored.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.ignored.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.ignored.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.ignored.xml?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.ignored.xml (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.ignored.xml Sat Jan  9 18:23:30 2010
@@ -0,0 +1,4 @@
+<AcResponse
+    Command="stat"
+    Directory="/home/ggardner/accurev/ws/maventst/tcktests"
+    TaskId="1010"/>

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noelement.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noelement.xml?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noelement.xml (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noelement.xml Sat Jan  9 18:23:30 2010
@@ -0,0 +1,11 @@
+<AcResponse
+    Command="stat"
+    Directory="/home/ggardner/accurev/ws/maventst/tcktests"
+    TaskId="1012">
+  <element
+      location="/./tcktests/noelement"
+      dir="no"
+      modTime="0"
+      size="0"
+      status="(no such elem)"/>
+</AcResponse>

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noworkspace.txt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noworkspace.txt?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noworkspace.txt (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noworkspace.txt Sat Jan  9 18:23:30 2010
@@ -0,0 +1 @@
+Bad element name.

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noworkspace.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noworkspace.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noworkspace.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/stat.noworkspace.xml?rev=897510&view=auto
==============================================================================
    (empty)

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/streamHistory.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/streamHistory.xml?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/streamHistory.xml (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/streamHistory.xml Sat Jan  9 18:23:30 2010
@@ -0,0 +1,108 @@
+
+<AcResponse
+    Command="hist"
+    TaskId="1690">
+  <transaction
+      id="50"
+      type="promote"
+      time="1233782838"
+      user="ggardner">
+    <version
+        path="/./tcktests/src/main/java/Application.java" 
+        eid="8"
+        virtual="1/1"
+        real="2/3"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_ggardner/3"
+        elem_type="text"
+        dir="no"/>
+    <version
+        path="/./tcktests/testfile1" 
+        eid="10"
+        virtual="1/1"
+        real="2/1"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_ggardner/1"
+        elem_type="text"
+        dir="no"/>
+  </transaction>
+  <transaction
+      id="30"
+      type="promote"
+      time="1232654731"
+      user="ggardner">
+    <comment>hpromoting</comment>
+    <version
+        path="/./tcktests/hello.world" 
+        eid="9"
+        virtual="1/2"
+        real="6/1"
+        virtualNamedVersion="maventst/2"
+        realNamedVersion="maventst_checkout2_ggardner/1"
+        elem_type="text"
+        dir="no"/>
+    <version
+        path="/./tcktests/addedotherstream.txt" 
+        eid="11"
+        virtual="1/1"
+        real="6/1"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_checkout2_ggardner/1"
+        elem_type="text"
+        dir="no"/>
+  </transaction>
+  <transaction
+      id="22"
+      type="promote"
+      time="1231408634"
+      user="ggardner">
+    <version
+        path="/./tcktests/hello.world" 
+        eid="9"
+        virtual="1/1"
+        real="2/1"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_ggardner/1"
+        elem_type="text"
+        dir="no"/>
+  </transaction>
+  <transaction
+      id="12"
+      type="promote"
+      time="1231060777"
+      user="ggardner">
+    <version
+        path="/./tcktests/src" 
+        eid="5"
+        virtual="1/1"
+        real="2/1"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_ggardner/1"
+        elem_type="dir"
+        dir="yes"/>
+    <version
+        path="/./tcktests/src/main" 
+        eid="6"
+        virtual="1/1"
+        real="2/1"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_ggardner/1"
+        elem_type="dir"
+        dir="yes"/>
+    <version
+        path="/./tcktests/src/main/java"
+        eid="7"
+        virtual="1/1"
+        real="2/1"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_ggardner/1"
+        elem_type="dir"
+        dir="yes"/>
+  </transaction>
+  <streams>
+    <stream
+        id="1"
+        name="maventst"
+        type="normal"/>
+  </streams>
+</AcResponse>

Added: maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/workspaceHistory.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/workspaceHistory.xml?rev=897510&view=auto
==============================================================================
--- maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/workspaceHistory.xml (added)
+++ maven/sandbox/trunk/scm/maven-scm-provider-accurevnew/src/test/resources/workspaceHistory.xml Sat Jan  9 18:23:30 2010
@@ -0,0 +1,122 @@
+
+<AcResponse
+    Command="hist"
+    TaskId="1691">
+  <transaction
+      id="39"
+      type="defcomp"
+      time="1232799675"
+      user="ggardner">
+    <version
+        path="/./tcktests/pom.xml" 
+        eid="4"
+        virtual="2/4"
+        real="2/4"
+        virtualNamedVersion="maventst_ggardner/4"
+        realNamedVersion="maventst_ggardner/4"
+        ancestor="2/1"
+        ancestorNamedVersion="maventst_ggardner/1"
+        elem_type="text"
+        dir="no"/>
+    <comp_rule
+        kind="excl"/>
+  </transaction>
+  <transaction
+      id="37"
+      type="defcomp"
+      time="1232799531"
+      user="ggardner">
+    <version
+        path="/./tcktests/pom.xml" 
+        eid="4"
+        virtual="2/4"
+        real="2/4"
+        virtualNamedVersion="maventst_ggardner/4"
+        realNamedVersion="maventst_ggardner/4"
+        ancestor="2/1"
+        ancestorNamedVersion="maventst_ggardner/1"
+        elem_type="text"
+        dir="no"/>
+    <comp_rule
+        kind="clear"/>
+    <version
+        path="/./tcktests/src" 
+        eid="5"
+        virtual="1/1"
+        real="2/1"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_ggardner/1"
+        elem_type="dir"
+        dir="yes"/>
+    <comp_rule
+        kind="clear"/>
+    <version
+        path="/./tcktests/src/main/java" 
+        eid="7"
+        virtual="1/1"
+        real="2/1"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_ggardner/1"
+        elem_type="dir"
+        dir="yes"/>
+    <comp_rule
+        kind="clear"/>
+  </transaction>
+  <transaction
+      id="36"
+      type="defcomp"
+      time="1232799357"
+      user="ggardner">
+    <version
+        path="/./tcktests/src" 
+        eid="5"
+        virtual="1/1"
+        real="2/1"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_ggardner/1"
+        elem_type="dir"
+        dir="yes"/>
+    <comp_rule
+        kind="incl"/>
+    <version
+        path="/./tcktests/pom.xml" 
+        eid="4"
+        virtual="2/4"
+        real="2/4"
+        virtualNamedVersion="maventst_ggardner/4"
+        realNamedVersion="maventst_ggardner/4"
+        ancestor="2/1"
+        ancestorNamedVersion="maventst_ggardner/1"
+        elem_type="text"
+        dir="no"/>
+    <comp_rule
+        kind="incl"/>
+  </transaction>
+  <transaction
+      id="35"
+      type="defcomp"
+      time="1232798952"
+      user="ggardner">
+    <version
+        path="/./tcktests/src/main/java"
+        eid="7"
+        virtual="1/1"
+        real="2/1"
+        virtualNamedVersion="maventst/1"
+        realNamedVersion="maventst_ggardner/1"
+        elem_type="dir"
+        dir="yes"/>
+    <comp_rule
+        kind="incl"/>
+  </transaction>
+  <streams>
+    <stream
+        id="1"
+        name="maventst"
+        type="normal"/>
+    <stream
+        id="2"
+        name="maventst_ggardner"
+        type="workspace"/>
+  </streams>
+</AcResponse>