mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-05-12 17:04:48 +00:00
ATS-691: Make path to test files OS agnostic (#197)
* ATS-691: Make path to test files OS agnostic * ATS-691: Decode URL object in the method's return
This commit is contained in:
parent
111fcfcc0e
commit
5c6782a3aa
@ -44,7 +44,9 @@ import java.io.File;
|
|||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.net.URLDecoder;
|
||||||
import java.nio.channels.FileChannel;
|
import java.nio.channels.FileChannel;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -166,9 +168,9 @@ public abstract class AbstractTransformerControllerTest
|
|||||||
if (required && testFileUrl == null)
|
if (required && testFileUrl == null)
|
||||||
{
|
{
|
||||||
throw new IOException("The test file " + testFilename +
|
throw new IOException("The test file " + testFilename +
|
||||||
" does not exist in the resources directory");
|
" does not exist in the resources directory");
|
||||||
}
|
}
|
||||||
return testFileUrl == null ? null : new File(testFileUrl.getFile());
|
return testFileUrl == null ? null : new File(URLDecoder.decode(testFileUrl.getPath(), "UTF-8"));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected MockHttpServletRequestBuilder mockMvcRequest(String url, MockMultipartFile sourceFile,
|
protected MockHttpServletRequestBuilder mockMvcRequest(String url, MockMultipartFile sourceFile,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user