001package org.apache.maven.scm.provider.accurev.command.checkin;
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.checkin.CheckInCommandTckTest;
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 AccuRevCheckInCommandTckTest
036    extends CheckInCommandTckTest
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 testCheckInCommandPartialFileset()
052        throws Exception
053    {
054        super.testCheckInCommandPartialFileset();
055    }
056
057    @Override
058    @Test
059    public void testCheckInCommandTest()
060        throws Exception
061    {
062        super.testCheckInCommandTest();
063    }
064
065    @Override
066    @Before
067    public void setUp()
068        throws Exception
069    {
070        super.setUp();
071    }
072
073    @Override
074    protected File getWorkingCopy()
075    {
076        return accurevTckTestUtil.getWorkingCopy();
077    }
078
079    @Override
080    protected File getAssertionCopy()
081    {
082        return accurevTckTestUtil.getAssertionCopy();
083    }
084
085    @Override
086    protected File getUpdatingCopy()
087    {
088        return accurevTckTestUtil.getUpdatingCopy();
089    }
090
091    @Override
092    public String getScmUrl()
093        throws Exception
094    {
095        return accurevTckTestUtil.getScmUrl();
096    }
097
098    @Override
099    public void initRepo()
100        throws Exception
101    {
102        accurevTckTestUtil.initRepo( getContainer() );
103
104    }
105
106    @Override
107    @After
108    public void tearDown()
109        throws Exception
110    {
111        try
112        {
113            accurevTckTestUtil.tearDown();
114            accurevTckTestUtil.removeWorkSpace( getWorkingCopy() );
115            accurevTckTestUtil.removeWorkSpace( getAssertionCopy() );
116        }
117        finally
118        {
119            super.tearDown();
120        }
121    }
122
123}