forked from Hithomelabs/CFTunnels
18 lines
486 B
Java
18 lines
486 B
Java
package com.hithomelabs.CFTunnels.TestUtils;
|
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
|
import java.io.IOException;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.file.Files;
|
|
|
|
public class Util {
|
|
|
|
public static String getClassPathDataResource(String filename) throws IOException {
|
|
return Files.readString(
|
|
new ClassPathResource(String.format("data/%s", filename)).getFile().toPath(),
|
|
StandardCharsets.UTF_8);
|
|
}
|
|
|
|
}
|