001package org.apache.maven.scm.provider.accurev.command.update;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *    http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import java.io.File;
023import java.io.InputStream;
024
025import org.apache.maven.scm.provider.accurev.cli.AccuRevJUnitUtil;
026import org.apache.maven.scm.provider.accurev.command.AccuRevTckUtil;
027import org.apache.maven.scm.tck.command.update.UpdateCommandTckTest;
028import org.junit.After;
029import org.junit.Before;
030import org.junit.Test;
031import org.junit.runner.RunWith;
032import org.junit.runners.JUnit4;
033
034@RunWith( JUnit4.class )
035public class AccuRevUpdateCommandTckTest
036    extends UpdateCommandTckTest
037{
038
039    private AccuRevTckUtil accurevTckTestUtil = new AccuRevTckUtil();
040
041    @Override
042    protected InputStream getCustomConfiguration()
043        throws Exception
044
045    {
046        return AccuRevJUnitUtil.getPlexusConfiguration();
047    }
048
049    @Override
050    @Test
051    public void testUpdateCommand()
052        throws Exception
053    {
054        super.testUpdateCommand();
055    }
056
057    @Override
058    @Before
059    public void setUp()
060        throws Exception
061    {
062        super.setUp();
063    }
064
065    @Override
066    protected File getWorkingCopy()
067    {
068        return accurevTckTestUtil.getWorkingCopy();
069    }
070
071    @Override
072    protected File getUpdatingCopy()
073    {
074        return accurevTckTestUtil.getUpdatingCopy();
075    }
076
077    @Override
078    public String getScmUrl()
079        throws Exception
080    {
081        return accurevTckTestUtil.getScmUrl();
082    }
083
084    @Override
085    public void initRepo()
086        throws Exception
087    {
088        accurevTckTestUtil.initRepo( getContainer() );
089    }
090
091    @Override
092    @After
093    public void tearDown()
094        throws Exception
095    {
096        try
097        {
098            accurevTckTestUtil.tearDown();
099            accurevTckTestUtil.removeWorkSpace( getWorkingCopy() );
100            accurevTckTestUtil.removeWorkSpace( getUpdatingCopy() );
101
102        }
103        finally
104        {
105            super.tearDown();
106        }
107    }
108
109}