public final class RefasterJsTestUtils
extends java.lang.Object
Constructor and Description |
---|
RefasterJsTestUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
assertFileRefactoring(java.lang.String refasterJsTemplate,
java.lang.String testDataPathPrefix,
java.lang.String originalFile,
java.util.List<java.lang.String> additionalSourceFiles,
java.lang.String expectedFile)
Performs refactoring using a RefasterJs template and asserts that result is as expected.
|
private static java.lang.String |
slurpFile(java.lang.String originalFile) |
public static void assertFileRefactoring(java.lang.String refasterJsTemplate, java.lang.String testDataPathPrefix, java.lang.String originalFile, java.util.List<java.lang.String> additionalSourceFiles, java.lang.String expectedFile) throws java.io.IOException
refasterJsTemplate
- path of the file or resource containing the RefasterJs
template to applytestDataPathPrefix
- path prefix of the directory from which input and
expected-output file will be readoriginalFile
- file name of the JavaScript source file to apply the refaster template toadditionalSourceFiles
- list of additional source files to provide to the compiler
(e.g. dependencies)expectedFile
- the expected result of applying the specified template to
originalFile
java.io.IOException
private static java.lang.String slurpFile(java.lang.String originalFile) throws java.io.IOException
java.io.IOException