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.SurefireLauncher;
23  
24  /**
25   * Enum listing all the JUnit version.
26   */
27  public enum JUnitVersion {
28  
29      JUNIT_4_0( "4.0" ),
30      JUNIT_4_1( "4.1" ),
31      JUNIT_4_2( "4.2" ),
32      JUNIT_4_3( "4.3" ),
33      JUNIT_4_3_1( "4.3.1" ),
34      JUNIT_4_4( "4.4" ),
35      JUNIT_4_5( "4.5" ),
36      JUNIT_4_6( "4.6" ),
37      JUNIT_4_7( "4.7" ),
38      JUNIT_4_8( "4.8" ),
39      JUNIT_4_8_1( "4.8.1" ),
40      JUNIT_4_8_2( "4.8.2" ),
41      JUNIT_4_9( "4.9" ),
42      JUNIT_4_10( "4.10" ),
43      JUNIT_4_11( "4.11" ),
44      JUNIT_4_12( "4.12" );
45  
46      private final String version;
47  
48      JUnitVersion( String version )
49      {
50          this.version = version;
51      }
52  
53      public SurefireLauncher configure( SurefireLauncher launcher )
54      {
55          return launcher.setJUnitVersion( version );
56      }
57  
58      public String toString()
59      {
60          return version;
61      }
62  }