View Javadoc

1   package org.apache.maven.surefire.its;
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 org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
23  import org.apache.maven.surefire.its.fixture.SurefireLauncher;
24  import org.junit.Test;
25  
26  /**
27   * Basic suite test using all known versions of JUnit 4.x
28   *
29   * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
30   */
31  public class Junit4VersionsIT
32      extends SurefireJUnit4IntegrationTestCase
33  {
34  
35      private SurefireLauncher unpack()
36      {
37          return unpack( "/junit4" );
38      }
39  
40      @Test
41      public void test40()
42          throws Exception
43      {
44          runJUnitTest( "4.0" );
45      }
46  
47      @Test
48      public void test41()
49          throws Exception
50      {
51          runJUnitTest( "4.1" );
52      }
53  
54      @Test
55      public void test42()
56          throws Exception
57      {
58          runJUnitTest( "4.2" );
59      }
60  
61      @Test
62      public void test43()
63          throws Exception
64      {
65          runJUnitTest( "4.3" );
66      }
67  
68      @Test
69      public void test431()
70          throws Exception
71      {
72          runJUnitTest( "4.3.1" );
73      }
74  
75      @Test
76      public void test44()
77          throws Exception
78      {
79          runJUnitTest( "4.4" );
80      }
81  
82      @Test
83      public void test45()
84          throws Exception
85      {
86          runJUnitTest( "4.5" );
87      }
88  
89      @Test
90      public void test46()
91          throws Exception
92      {
93          runJUnitTest( "4.6" );
94      }
95  
96      @Test
97      public void test47()
98          throws Exception
99      {
100         runJUnitTest( "4.7" );
101     }
102 
103     public void runJUnitTest( String version )
104         throws Exception
105     {
106         unpack().setJUnitVersion( version ).executeTest().verifyErrorFree( 1 );
107     }
108 }