View Javadoc

1   package org.apache.maven.scm.provider.accurev.command.checkout;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *    http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.io.File;
23  import java.io.InputStream;
24  
25  import org.apache.maven.scm.provider.accurev.cli.AccuRevJUnitUtil;
26  import org.apache.maven.scm.provider.accurev.command.AccuRevTckUtil;
27  import org.apache.maven.scm.tck.command.checkout.CheckOutCommandTckTest;
28  import org.junit.After;
29  import org.junit.Before;
30  import org.junit.Test;
31  import org.junit.runner.RunWith;
32  import org.junit.runners.JUnit4;
33  
34  /**
35   * TODO TckTest does not adhere to repository path return from checkout result. Raise a JIRA to fix that.
36   * 
37   * @author ggardner
38   */
39  @RunWith( JUnit4.class )
40  public class AccuRevCheckoutCommandTckTest
41      extends CheckOutCommandTckTest
42  {
43  
44      protected AccuRevTckUtil testUtil = new AccuRevTckUtil();
45  
46      @Override
47      protected InputStream getCustomConfiguration()
48          throws Exception
49  
50      {
51          return AccuRevJUnitUtil.getPlexusConfiguration();
52      }
53  
54      @Override
55      protected File getWorkingCopy()
56      {
57          return testUtil.getWorkingCopy();
58      }
59  
60      @Override
61      protected File getAssertionCopy()
62      {
63          return testUtil.getAssertionCopy();
64      }
65  
66      @Override
67      protected File getUpdatingCopy()
68      {
69          return testUtil.getUpdatingCopy();
70      }
71  
72      @Override
73      public String getScmUrl()
74          throws Exception
75      {
76          return testUtil.getScmUrl();
77      }
78  
79      @Override
80      public void initRepo()
81          throws Exception
82      {
83          testUtil.initRepo( getContainer() );
84      }
85  
86      @Override
87      @Test
88      public void testCheckOutCommandTest()
89          throws Exception
90      {
91          super.testCheckOutCommandTest();
92      }
93  
94      @Override
95      @Before
96      public void setUp()
97          throws Exception
98      {
99          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 }