Skip to content

Commit

Permalink
Remove JVM-specific way of reading test resources (#366)
Browse files Browse the repository at this point in the history
Part of #269.

It's not used anywhere, after migrating tests that use resources to
common Kotlin.
  • Loading branch information
krzema12 authored Jan 17, 2025
1 parent 53648e2 commit dabbc26
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/jvmTest/java/org/snakeyaml/engine/v2/utils/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@

public abstract class TestUtils {

public static String getResource(@Language("file-reference") String theName) {
InputStream inputStream = getResourceAsStream(theName);
return new BufferedReader(new InputStreamReader(inputStream)).lines()
.collect(Collectors.joining("\n", "", "\n"));
}

public static InputStream getResourceAsStream(@Language("file-reference") String theName) {
InputStream inputStream = TestUtils.class.getResourceAsStream(theName);
if (inputStream == null) {
throw new RuntimeException("Resource not found: " + theName);
}
return inputStream;
}

public static void compareEvents(List<Event> list1, List<Event> list2) {
assertEquals(list1.size(), list2.size());
for (Event event1 : list1) {
Expand Down

0 comments on commit dabbc26

Please sign in to comment.