Skip to content

Commit a6e6fbd

Browse files
committed
test: suppress expected warnings
Fixes #198.
1 parent 86bebd8 commit a6e6fbd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/java/com/github/packageurl/PackageURLTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ static Stream<Arguments> constructorParsing() throws IOException {
8686
"test-suite-data.json", "custom-suite.json", "string-constructor-only.json");
8787
}
8888

89+
@SuppressWarnings({"ConstantConditions", "unused"})
8990
@DisplayName("Test constructor parsing")
9091
@ParameterizedTest(name = "{0}: ''{1}''")
9192
@MethodSource
@@ -113,6 +114,7 @@ static Stream<Arguments> constructorParameters() throws IOException {
113114
"test-suite-data.json", "custom-suite.json", "components-constructor-only.json");
114115
}
115116

117+
@SuppressWarnings({"ConstantConditions", "unused"})
116118
@DisplayName("Test constructor parameters")
117119
@ParameterizedTest(name = "{0}: {2}")
118120
@MethodSource
@@ -151,6 +153,7 @@ static Stream<Arguments> constructorTypeNameSpace() throws IOException {
151153
return PurlParameters.getTestDataFromFiles("type-namespace-constructor-only.json");
152154
}
153155

156+
@SuppressWarnings({"ConstantConditions", "unused"})
154157
@ParameterizedTest
155158
@MethodSource
156159
void constructorTypeNameSpace(
@@ -195,6 +198,7 @@ private static Class<? extends Exception> getExpectedException(@Nullable String
195198
return value == null || value.isEmpty() ? null : value;
196199
}
197200

201+
@SuppressWarnings("java:S5961")
198202
@Test
199203
void standardTypes() {
200204
assertEquals("alpm", PackageURL.StandardTypes.ALPM);

0 commit comments

Comments
 (0)