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