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.rat.analysis.license;
20  
21  import java.util.stream.Stream;
22  
23  import org.junit.jupiter.params.provider.Arguments;
24  
25  public class AppliedApacheSoftwareLicenseTest extends AbstractLicenseTest {
26  
27      private static String ID = "ASL";
28      private static String NAME = "Applied Apache License Version 2.0";
29      private static String[][] targets = { { "simple", "/*\n" + " *  Copyright 2012-2013 FooBar.\n" + " *\n"
30              + " *  Licensed under the Apache License, Version 2.0 (the \"License\");\n"
31              + " *  you may not use this file except in compliance with the License.\n" + " *\n"
32              + " *  You may obtain a copy of the License at\n" + " *       http://www.apache.org/licenses/LICENSE-2.0\n"
33              + " *\n" + " *  Unless required by applicable law or agreed to in writing, software\n"
34              + " *  distributed under the License is distributed on an \"AS IS\" BASIS,\n"
35              + " *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
36              + " *  See the License for the specific language governing permissions and\n"
37              + " *  limitations under the License.\n" + " */\n" } };
38  
39      public static Stream<Arguments> parameterProvider() {
40          return Stream.of(Arguments.of(ID, ApacheSoftwareLicenseTest.id, ApacheSoftwareLicenseTest.name, null, targets));
41      }
42  
43      /*
44        
45      
46      @Test(timeout = 2000) // may need to be adjusted if many more files are added
47      public void goodFiles() throws Exception {
48          DirectoryScanner.testFilesInDir("appliedAL20/good", license, true);
49      }
50      
51      @Test(timeout = 2000) // may need to be adjusted if many more files are added
52      public void baddFiles() throws Exception {
53          DirectoryScanner.testFilesInDir("appliedAL20/bad", license, false);
54      }
55      */
56  
57  }