001package org.apache.maven.scm.provider.accurev.command.checkout;
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.checkout.CheckOutCommandTckTest;
028import org.junit.After;
029import org.junit.Before;
030import org.junit.Test;
031import org.junit.runner.RunWith;
032import org.junit.runners.JUnit4;
033
034/**
035 * TODO TckTest does not adhere to repository path return from checkout result. Raise a JIRA to fix that.
036 * 
037 * @author ggardner
038 */
039@RunWith( JUnit4.class )
040public class AccuRevCheckoutCommandTckTest
041    extends CheckOutCommandTckTest
042{
043
044    protected AccuRevTckUtil testUtil = new AccuRevTckUtil();
045
046    @Override
047    protected InputStream getCustomConfiguration()
048        throws Exception
049
050    {
051        return AccuRevJUnitUtil.getPlexusConfiguration();
052    }
053
054    @Override
055    protected File getWorkingCopy()
056    {
057        return testUtil.getWorkingCopy();
058    }
059
060    @Override
061    protected File getAssertionCopy()
062    {
063        return testUtil.getAssertionCopy();
064    }
065
066    @Override
067    protected File getUpdatingCopy()
068    {
069        return testUtil.getUpdatingCopy();
070    }
071
072    @Override
073    public String getScmUrl()
074        throws Exception
075    {
076        return testUtil.getScmUrl();
077    }
078
079    @Override
080    public void initRepo()
081        throws Exception
082    {
083        testUtil.initRepo( getContainer() );
084    }
085
086    @Override
087    @Test
088    public void testCheckOutCommandTest()
089        throws Exception
090    {
091        super.testCheckOutCommandTest();
092    }
093
094    @Override
095    @Before
096    public void setUp()
097        throws Exception
098    {
099        super.setUp();
100    }
101
102    @Override
103    @After
104    public void tearDown()
105        throws Exception
106    {
107        try
108        {
109            testUtil.tearDown();
110            testUtil.removeWorkSpace( getWorkingCopy() );
111
112        }
113        finally
114        {
115            super.tearDown();
116        }
117    }
118
119}