Skip to content

Commit e0b6eb3

Browse files
committed
test: create a class to provide invalid data
Signed-off-by: Maximillian Arruda <[email protected]>
1 parent e9e1929 commit e0b6eb3

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Copyright 2023 the original author or authors.
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+
18+
package br.org.soujava.pomeditor;
19+
20+
import org.junit.jupiter.api.extension.ExtensionContext;
21+
import org.junit.jupiter.params.provider.Arguments;
22+
import org.junit.jupiter.params.provider.ArgumentsProvider;
23+
24+
import java.util.stream.Stream;
25+
26+
import static org.junit.jupiter.params.provider.Arguments.arguments;
27+
28+
public class InvalidGroupIdArtifactIdArgs implements ArgumentsProvider {
29+
30+
@Override
31+
public Stream<? extends Arguments> provideArguments(ExtensionContext extensionContext) {
32+
return Stream.of(
33+
arguments(
34+
null, // groupId,
35+
null // artifactId,
36+
),
37+
arguments(
38+
null, // groupId,
39+
"artifactId" // artifactId,
40+
),
41+
arguments(
42+
"groupId", // groupId,
43+
null // artifactId,
44+
),
45+
arguments(
46+
"", // groupId,
47+
"" // artifactId,
48+
),
49+
arguments(
50+
"", // groupId,
51+
"artifactId" // artifactId,
52+
),
53+
arguments(
54+
"groupId", // groupId,
55+
"" // artifactId,
56+
)
57+
);
58+
}
59+
}

0 commit comments

Comments
 (0)