View Javadoc
1   package org.apache.maven.surefire.its.fixture;
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  /**
23   * @author <a href="mailto:tibordigana@apache.org">Tibor Digana (tibor17)</a>
24   * @since 2.19
25   */
26  public enum Settings
27  {
28      JUNIT4_TEST( TestFramework.JUNIT4, Configuration.TEST ),
29      JUNIT47_TEST( TestFramework.JUNIT47, Configuration.TEST ),
30      JUNIT4_INCLUDES( TestFramework.JUNIT4, Configuration.INCLUDES ),
31      JUNIT47_INCLUDES( TestFramework.JUNIT47, Configuration.INCLUDES ),
32      JUNIT4_INCLUDES_EXCLUDES( TestFramework.JUNIT4, Configuration.INCLUDES_EXCLUDES ),
33      JUNIT47_INCLUDES_EXCLUDES( TestFramework.JUNIT47, Configuration.INCLUDES_EXCLUDES ),
34      JUNIT4_INCLUDES_FILE( TestFramework.JUNIT4, Configuration.INCLUDES_FILE ),
35      JUNIT47_INCLUDES_FILE( TestFramework.JUNIT47, Configuration.INCLUDES_FILE ),
36      JUNIT4_INCLUDES_EXCLUDES_FILE( TestFramework.JUNIT4, Configuration.INCLUDES_EXCLUDES_FILE ),
37      JUNIT47_INCLUDES_EXCLUDES_FILE( TestFramework.JUNIT47, Configuration.INCLUDES_EXCLUDES_FILE ),
38      TestNG_TEST( TestFramework.TestNG, Configuration.TEST ),
39      TestNG_INCLUDES( TestFramework.TestNG, Configuration.INCLUDES ),
40      TestNG_INCLUDES_EXCLUDES( TestFramework.TestNG, Configuration.INCLUDES_EXCLUDES ),
41      TestNG_INCLUDES_FILE( TestFramework.TestNG, Configuration.INCLUDES_FILE ),
42      TestNG_INCLUDES_EXCLUDES_FILE( TestFramework.TestNG, Configuration.INCLUDES_EXCLUDES_FILE );
43  
44      private final TestFramework framework;
45      private final Configuration configuration;
46  
47      Settings( TestFramework framework, Configuration configuration )
48      {
49          this.framework = framework;
50          this.configuration = configuration;
51      }
52  
53      public String path()
54      {
55          return name().replace( '_', '-' ).toLowerCase();
56      }
57  
58      public String profile()
59      {
60          return path();
61      }
62  
63      public TestFramework getFramework()
64      {
65          return framework;
66      }
67  
68      public Configuration getConfiguration()
69      {
70          return configuration;
71      }
72  }