Skip to content

Commit e739728

Browse files
committed
Move test to dedicated issue spec
The test for #9 is quite specific so it's moved to a dedicated class to not confuse readers of PluginDescriptorGenerationFuncTest.
1 parent e12aede commit e739728

File tree

2 files changed

+41
-17
lines changed

2 files changed

+41
-17
lines changed

subprojects/plugin/src/compatTest/groovy/de/benediktritter/maven/plugin/development/PluginDescriptorGenerationFuncTest.groovy

-17
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,6 @@ class PluginDescriptorGenerationFuncTest extends AbstractPluginFuncTest {
121121
result.output.contains("ArtifactIds of the form maven-___-plugin are reserved for plugins of the maven team. Please change the plugin artifactId to the format ___-maven-plugin.")
122122
}
123123

124-
def "works even if weird enums are present"() {
125-
given:
126-
file("src/main/java/TypedEnum.java") << """
127-
import java.util.List;
128-
public enum TypedEnum {
129-
ENUM_VALUE {
130-
private <T> List<T> genericMethod(List<T> list) {
131-
return list;
132-
}
133-
}
134-
}
135-
"""
136-
137-
expect:
138-
run("generateMavenPluginDescriptor")
139-
}
140-
141124
def "generates a plugin and help descriptor for mojos in the main source set"() {
142125
given:
143126
buildFile << """
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2022 Benedikt Ritter
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package de.benediktritter.maven.plugin.development.issues
18+
19+
import de.benediktritter.maven.plugin.development.AbstractPluginFuncTest
20+
import spock.lang.Issue
21+
22+
@Issue("https://github.com/britter/maven-plugin-development/pull/9")
23+
class Issue9FuncTest extends AbstractPluginFuncTest {
24+
25+
def "works even if weird enums are present"() {
26+
given:
27+
file("src/main/java/TypedEnum.java") << """
28+
import java.util.List;
29+
public enum TypedEnum {
30+
ENUM_VALUE {
31+
private <T> List<T> genericMethod(List<T> list) {
32+
return list;
33+
}
34+
}
35+
}
36+
"""
37+
38+
expect:
39+
run("generateMavenPluginDescriptor")
40+
}
41+
}

0 commit comments

Comments
 (0)