View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.surefire.its;
20  
21  import java.util.Arrays;
22  
23  import org.apache.maven.surefire.its.fixture.Settings;
24  import org.apache.maven.surefire.its.fixture.SurefireLauncher;
25  import org.junit.runner.RunWith;
26  import org.junit.runners.Parameterized;
27  import org.junit.runners.Parameterized.Parameters;
28  
29  /**
30   * JUnit test project using multiple method patterns, including wildcards in class and method names.
31   */
32  @RunWith(Parameterized.class)
33  public class TestMultipleMethodPatternsIT extends AbstractTestMultipleMethodPatterns {
34      private final Settings settings;
35  
36      public TestMultipleMethodPatternsIT(Settings settings) {
37          this.settings = settings;
38      }
39  
40      @Parameters
41      public static Iterable<Object[]> data() {
42          return Arrays.asList(new Object[][] {
43              {Settings.JUNIT4_TEST},
44              {Settings.JUNIT47_TEST},
45              {Settings.JUNIT4_INCLUDES},
46              {Settings.JUNIT47_INCLUDES},
47              {Settings.JUNIT4_INCLUDES_EXCLUDES},
48              {Settings.JUNIT47_INCLUDES_EXCLUDES}
49          });
50      }
51  
52      @Override
53      protected Settings getSettings() {
54          return settings;
55      }
56  
57      @Override
58      protected SurefireLauncher unpack() {
59          return unpack("junit48-multiple-method-patterns", "_" + settings.path());
60      }
61  }