1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.ftp.reliability;
12
13 import org.mule.tck.probe.Probe;
14
15 import java.util.Arrays;
16 import java.util.Collection;
17
18 import org.junit.Test;
19 import org.junit.runners.Parameterized.Parameters;
20
21
22
23
24
25
26
27
28
29
30 public class InboundMessageLossFlowTestCase extends InboundMessageLossTestCase
31 {
32 @Parameters
33 public static Collection<Object[]> parameters()
34 {
35 return Arrays.asList(new Object[][]{
36 {ConfigVariant.FLOW, "reliability/inbound-message-loss-flow.xml"}
37 });
38 }
39
40 public InboundMessageLossFlowTestCase(ConfigVariant variant, String configResources)
41 {
42 super(variant, configResources);
43 }
44
45 @Override
46 @Test
47 public void testTransformerException() throws Exception
48 {
49 createFileOnFtpServer("transformerException/test1");
50 prober.check(new Probe()
51 {
52 @Override
53 public boolean isSatisfied()
54 {
55
56
57
58
59 return !fileExists("transformerException/test1");
60 }
61
62 @Override
63 public String describeFailure()
64 {
65 return "File should be gone";
66 }
67 });
68 }
69
70 @Override
71 @Test
72 public void testRouterException() throws Exception
73 {
74 createFileOnFtpServer("routerException/test1");
75 prober.check(new Probe()
76 {
77 @Override
78 public boolean isSatisfied()
79 {
80
81
82
83
84 return !fileExists("routerException/test1");
85 }
86
87 @Override
88 public String describeFailure()
89 {
90 return "File should be gone";
91 }
92 });
93 }
94 }