1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
26
27
28
29 public class ApacheSoftwareLicenseTest extends AbstractLicenseTest {
30
31 public static final String id = "AL";
32 public static final String name = "Apache License Version 2.0";
33 private static String[][] targets = {
34 { "short", "Licensed under the Apache License, Version 2.0 (the \"License\")" },
35 { "short2",
36 "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0." },
37 { "http", "http://www.apache.org/licenses/LICENSE-2.0" },
38 { "https", "https://www.apache.org/licenses/LICENSE-2.0" },
39 { "html", "http://www.apache.org/licenses/LICENSE-2.0.html" },
40 { "htmls", "https://www.apache.org/licenses/LICENSE-2.0.html" },
41 { "txt", "http://www.apache.org/licenses/LICENSE-2.0.txt" },
42 { "txts", "https://www.apache.org/licenses/LICENSE-2.0.txt" },
43 { "fullTxt",
44 "Licensed under the Apache License, Version 2.0 (the \"License\")\nyou may not use this file except "
45 + "in compliance with the License.\nYou may obtain a copy of the License at\n"
46 + "http://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable "
47 + "law or agreed to in writing, software\ndistributed under the License is "
48 + "distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either "
49 + "express or implied.\nSee the License for the specific language governing permissions and\n"
50 + "limitations under the License.\n" },
51 { "spdx-tab", "SPDX-License-Identifier:\tApache-2.0" },
52 { "spdx-space", "SPDX-License-Identifier: Apache-2.0" },
53 { "long text",
54 "/*\n" + " * Licensed under the Apache License, Version 2.0 (the \"License\");\n"
55 + " * you may not use this file except in compliance with the License.\n" + " *\n"
56 + " * You may obtain a copy of the License at\n"
57 + " * http://www.apache.org/licenses/LICENSE-2.0\n" + " *\n"
58 + " * Unless required by applicable law or agreed to in writing, software\n"
59 + " * distributed under the License is distributed on an \"AS IS\" BASIS,\n"
60 + " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
61 + " * See the License for the specific language governing permissions and\n"
62 + " * limitations under the License.\n" + " */\n" }
63
64 };
65
66 public static Stream<Arguments> parameterProvider() {
67 return Stream.of(Arguments.of(id, id, name, null, targets));
68 }
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83 }