View Javadoc

1   package org.apache.maven.surefire.its;
2   /*
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   *     http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing,
14   * software distributed under the License is distributed on an
15   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16   * KIND, either express or implied.  See the License for the
17   * specific language governing permissions and limitations
18   * under the License.
19   */
20  
21  
22  /**
23   * Basic suite test using all known versions of JUnit 4.x
24   *
25   * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
26   */
27  public class Junit4VersionsIT
28      extends SurefireVerifierTestClass
29  {
30  
31      public Junit4VersionsIT()
32      {
33          super( "/junit4" );
34      }
35  
36      public void test40()
37          throws Exception
38      {
39          runJUnitTest( "4.0" );
40      }
41  
42      public void test41()
43          throws Exception
44      {
45          runJUnitTest( "4.1" );
46      }
47  
48      public void test42()
49          throws Exception
50      {
51          runJUnitTest( "4.2" );
52      }
53  
54      public void test43()
55          throws Exception
56      {
57          runJUnitTest( "4.3" );
58      }
59  
60      public void test431()
61          throws Exception
62      {
63          runJUnitTest( "4.3.1" );
64      }
65  
66      public void test44()
67          throws Exception
68      {
69          runJUnitTest( "4.4" );
70      }
71  
72      public void test45()
73          throws Exception
74      {
75          runJUnitTest( "4.5" );
76      }
77  
78      public void test46()
79          throws Exception
80      {
81          runJUnitTest( "4.6" );
82      }
83  
84      public void test47()
85          throws Exception
86      {
87          runJUnitTest( "4.7" );
88      }
89  
90  
91      public void runJUnitTest( String version )
92          throws Exception
93      {
94          addGoal( "-DjunitVersion=" + version );
95          executeTest();
96          verifyErrorFreeLog();
97          assertTestSuiteResults( 1, 0, 0, 0 );
98      }
99  }