Search in sources :

Example 1 with FtpletResult

use of org.apache.ftpserver.ftplet.FtpletResult in project ddf by codice.

the class FtpRequestHandlerTest method testOnDeleteStart.

@Test
public void testOnDeleteStart() throws FtpException, IOException {
    FtpletResult result = ftplet.onDeleteStart(session, request);
    assertEquals(FtpletResult.SKIP, result);
    assertThat(getReplyCodes(), hasItem(250));
}
Also used : FtpletResult(org.apache.ftpserver.ftplet.FtpletResult) Test(org.junit.Test)

Example 2 with FtpletResult

use of org.apache.ftpserver.ftplet.FtpletResult in project ddf by codice.

the class FtpRequestHandlerTest method testFileIngestSuccess.

@Test
public void testFileIngestSuccess() throws FtpException, IOException, SourceUnavailableException, IngestException {
    setupIngest();
    FtpletResult result = ftplet.onUploadStart(session, request);
    assertEquals(FtpletResult.SKIP, result);
}
Also used : FtpletResult(org.apache.ftpserver.ftplet.FtpletResult) Test(org.junit.Test)

Example 3 with FtpletResult

use of org.apache.ftpserver.ftplet.FtpletResult in project ddf by codice.

the class FtpRequestHandlerTest method testOnSite.

@Test
public void testOnSite() throws FtpException, IOException {
    FtpletResult result = ftplet.onSite(session, request);
    assertEquals(FtpletResult.SKIP, result);
    assertThat(getReplyCodes(), hasItem(202));
}
Also used : FtpletResult(org.apache.ftpserver.ftplet.FtpletResult) Test(org.junit.Test)

Example 4 with FtpletResult

use of org.apache.ftpserver.ftplet.FtpletResult in project ddf by codice.

the class FtpRequestHandlerTest method testOnDownloadStart.

@Test
public void testOnDownloadStart() throws FtpException, IOException {
    FtpletResult result = ftplet.onDownloadStart(session, request);
    assertEquals(FtpletResult.SKIP, result);
    assertThat(getReplyCodes(), hasItem(250));
}
Also used : FtpletResult(org.apache.ftpserver.ftplet.FtpletResult) Test(org.junit.Test)

Example 5 with FtpletResult

use of org.apache.ftpserver.ftplet.FtpletResult in project ddf by codice.

the class FtpRequestHandlerTest method testOnAppendStart.

@Test
public void testOnAppendStart() throws FtpException, IOException {
    FtpletResult result = ftplet.onAppendStart(session, request);
    assertEquals(FtpletResult.SKIP, result);
    assertThat(getReplyCodes(), hasItem(250));
}
Also used : FtpletResult(org.apache.ftpserver.ftplet.FtpletResult) Test(org.junit.Test)

Aggregations

FtpletResult (org.apache.ftpserver.ftplet.FtpletResult)9 Test (org.junit.Test)9 FtpFile (org.apache.ftpserver.ftplet.FtpFile)1 FtpReply (org.apache.ftpserver.ftplet.FtpReply)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1