Search in sources :

Example 11 with UrlMessage

use of nl.nn.adapterframework.stream.UrlMessage in project iaf by ibissource.

the class UnzipPipeTest method testCreateSubDirectoriesKeepFilename.

@Test
public void testCreateSubDirectoriesKeepFilename() throws Exception {
    pipe.setKeepOriginalFileName(true);
    pipe.setKeepOriginalFilePath(true);
    pipe.setDeleteOnExit(false);
    configureAndStartPipe();
    URL zip = TestFileUtils.getTestFileURL("/Unzip/folder.zip");
    doPipe(new UrlMessage(zip));
    File toBePresent = new File(folder.getRoot() + "/Folder/innerFolder/innerFile.txt");
    assertTrue(toBePresent.isFile());
}
Also used : UrlMessage(nl.nn.adapterframework.stream.UrlMessage) File(java.io.File) URL(java.net.URL) Test(org.junit.Test)

Example 12 with UrlMessage

use of nl.nn.adapterframework.stream.UrlMessage in project iaf by ibissource.

the class UnzipPipeTest method testNullDirectoryFakeSessionKey.

@Test
public void testNullDirectoryFakeSessionKey() throws Exception {
    exception.expectMessage("directorySessionKey is empty");
    pipe.setDirectory(null);
    pipe.setDirectorySessionKey("dummy");
    configureAndStartPipe();
    URL zip = TestFileUtils.getTestFileURL("/Unzip/folder.zip");
    doPipe(new UrlMessage(zip));
}
Also used : UrlMessage(nl.nn.adapterframework.stream.UrlMessage) URL(java.net.URL) Test(org.junit.Test)

Aggregations

URL (java.net.URL)12 UrlMessage (nl.nn.adapterframework.stream.UrlMessage)12 Test (org.junit.Test)12 File (java.io.File)6 PipeRunResult (nl.nn.adapterframework.core.PipeRunResult)4 PipeLineSession (nl.nn.adapterframework.core.PipeLineSession)1 Message (nl.nn.adapterframework.stream.Message)1