1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.sftp;
12
13 import java.util.Arrays;
14 import java.util.Collection;
15
16 import org.junit.Test;
17 import org.junit.runners.Parameterized.Parameters;
18
19
20
21
22 public class SftpSizeCheckFunctionalTestCase extends AbstractSftpTestCase
23 {
24
25 private static final long TIMEOUT = 15000;
26
27
28 final static int SEND_SIZE = 1024 * 1024 * 2;
29
30 public SftpSizeCheckFunctionalTestCase(ConfigVariant variant, String configResources)
31 {
32 super(variant, configResources);
33 }
34
35 @Parameters
36 public static Collection<Object[]> parameters()
37 {
38 return Arrays.asList(new Object[][]{
39 {ConfigVariant.SERVICE, "mule-sftp-sizeCheck-test-config-service.xml"},
40 {ConfigVariant.FLOW, "mule-sftp-sizeCheck-test-config-flow.xml"}
41 });
42 }
43
44 @Override
45 protected void doSetUp() throws Exception
46 {
47 super.doSetUp();
48
49 initEndpointDirectory("inboundEndpoint");
50 }
51
52
53
54
55 @Test
56 public void testSizeCheck() throws Exception
57 {
58
59
60
61
62 executeBaseTest("inboundEndpoint", "vm://test.upload", FILE_NAME, SEND_SIZE, "receiving", TIMEOUT);
63 }
64 }