File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed
src/integration-test/java/com/commercetools/sync/integration/commons/utils Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change 22
33import static io .vrap .rmf .base .client .utils .json .JsonUtils .fromInputStream ;
44
5- import java .io .IOException ;
65import java .io .InputStream ;
7- import java .io .UncheckedIOException ;
8- import java .nio .charset .StandardCharsets ;
9- import java .util .Objects ;
10- import org .apache .commons .io .IOUtils ;
116
127public class TestUtils {
13- public static String stringFromResource (final String resourcePath ) {
14- try {
15- return IOUtils .toString (
16- Objects .requireNonNull (
17- Thread .currentThread ().getContextClassLoader ().getResourceAsStream (resourcePath )),
18- StandardCharsets .UTF_8 );
19- } catch (final IOException e ) {
20- throw new UncheckedIOException (e );
21- }
22- }
23-
248 public static <T > T readObjectFromResource (final String resourcePath , final Class <T > objectType ) {
259 final InputStream resourceAsStream =
2610 Thread .currentThread ().getContextClassLoader ().getResourceAsStream (resourcePath );
You can’t perform that action at this time.
0 commit comments