1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.file.reliability;
12
13 import org.mule.tck.probe.Probe;
14
15 import java.io.File;
16
17 import org.junit.Test;
18
19
20 public class InboundMessageLossFlowTestCase extends InboundMessageLossTestCase
21 {
22 public InboundMessageLossFlowTestCase(ConfigVariant variant, String configResources)
23 {
24 super(variant, configResources);
25 }
26
27 @Override
28 protected String getConfigResources()
29 {
30 return "reliability/inbound-message-loss-flow.xml";
31 }
32
33 @Test
34 @Override
35 public void testTransformerException() throws Exception
36 {
37 tmpDir = createFolder(".mule/transformerException");
38 final File file = createDataFile(tmpDir, "test1.txt");
39 prober.check(new Probe()
40 {
41 @Override
42 public boolean isSatisfied()
43 {
44
45
46
47
48 return !file.exists();
49 }
50
51 @Override
52 public String describeFailure()
53 {
54 return "File should be gone";
55 }
56 });
57 }
58
59 @Test
60 @Override
61 public void testRouterException() throws Exception
62 {
63 tmpDir = createFolder(".mule/routerException");
64 final File file = createDataFile(tmpDir, "test1.txt");
65 prober.check(new Probe()
66 {
67 @Override
68 public boolean isSatisfied()
69 {
70
71
72
73
74 return !file.exists();
75 }
76
77 @Override
78 public String describeFailure()
79 {
80 return "File should be gone";
81 }
82 });
83 }
84 }