This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
The following commit(s) were added to refs/heads/master by this push:
new 4bb932de Add ResourcesTest
4bb932de is described below
commit 4bb932dee2b8a5cbefd39322c742056f8b2cea3f
Author: Gary D. Gregory <[email protected]>
AuthorDate: Fri Dec 27 14:26:38 2024 -0500
Add ResourcesTest
---
.../org/apache/commons/codec/ResourcesTest.java | 44 ++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/src/test/java/org/apache/commons/codec/ResourcesTest.java
b/src/test/java/org/apache/commons/codec/ResourcesTest.java
new file mode 100644
index 00000000..176e1fb5
--- /dev/null
+++ b/src/test/java/org/apache/commons/codec/ResourcesTest.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.codec;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+
+/**
+ * Tests {@link Resources}.
+ */
+public class ResourcesTest {
+
+ static List<String> getResourceNames() {
+ return Arrays.asList("org/apache/commons/codec/language/dmrules.txt",
"org/apache/commons/codec/language/bm/lang.txt");
+ }
+
+ @ParameterizedTest
+ @MethodSource("getResourceNames")
+ public void testGetInputStream(final String resName) throws IOException {
+ try (InputStream in = Resources.getInputStream(resName)) {
+ // empty
+ }
+ }
+}