Skip to content

Commit

Permalink
Remove unused TestUtility function
Browse files Browse the repository at this point in the history
  • Loading branch information
salander85 committed Dec 5, 2023
1 parent 25f9ec3 commit dae798a
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,9 @@

import static io.vrap.rmf.base.client.utils.json.JsonUtils.fromInputStream;

import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import java.util.Objects;
import org.apache.commons.io.IOUtils;

public class TestUtils {
public static String stringFromResource(final String resourcePath) {
try {
return IOUtils.toString(
Objects.requireNonNull(
Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath)),
StandardCharsets.UTF_8);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}

public static <T> T readObjectFromResource(final String resourcePath, final Class<T> objectType) {
final InputStream resourceAsStream =
Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath);
Expand Down

0 comments on commit dae798a

Please sign in to comment.