View Javadoc
1   package org.apache.maven.scm.provider.accurev.command.update;
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.update.UpdateCommandTckTest;
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  @RunWith( JUnit4.class )
35  public class AccuRevUpdateCommandTckTest
36      extends UpdateCommandTckTest
37  {
38  
39      private AccuRevTckUtil accurevTckTestUtil = new AccuRevTckUtil();
40  
41      @Override
42      protected InputStream getCustomConfiguration()
43          throws Exception
44  
45      {
46          return AccuRevJUnitUtil.getPlexusConfiguration();
47      }
48  
49      @Override
50      @Test
51      public void testUpdateCommand()
52          throws Exception
53      {
54          super.testUpdateCommand();
55      }
56  
57      @Override
58      @Before
59      public void setUp()
60          throws Exception
61      {
62          super.setUp();
63      }
64  
65      @Override
66      protected File getWorkingCopy()
67      {
68          return accurevTckTestUtil.getWorkingCopy();
69      }
70  
71      @Override
72      protected File getUpdatingCopy()
73      {
74          return accurevTckTestUtil.getUpdatingCopy();
75      }
76  
77      @Override
78      public String getScmUrl()
79          throws Exception
80      {
81          return accurevTckTestUtil.getScmUrl();
82      }
83  
84      @Override
85      public void initRepo()
86          throws Exception
87      {
88          accurevTckTestUtil.initRepo( getContainer() );
89      }
90  
91      @Override
92      @After
93      public void tearDown()
94          throws Exception
95      {
96          try
97          {
98              accurevTckTestUtil.tearDown();
99              accurevTckTestUtil.removeWorkSpace( getWorkingCopy() );
100             accurevTckTestUtil.removeWorkSpace( getUpdatingCopy() );
101 
102         }
103         finally
104         {
105             super.tearDown();
106         }
107     }
108 
109 }