1
2
3
4
5
6
7 package org.mule.module.atom;
8
9 import org.mule.tck.junit4.FunctionalTestCase;
10 import org.mule.tck.functional.CounterCallback;
11 import org.mule.tck.functional.FunctionalTestComponent;
12
13 import org.junit.Test;
14
15 import static org.junit.Assert.assertEquals;
16 import static org.junit.Assert.assertTrue;
17
18 public class FeedConsumeAndSplitExplicitTestCase extends FunctionalTestCase
19 {
20
21 private final CounterCallback counter = new CounterCallback();
22
23 @Override
24 protected String getConfigResources()
25 {
26 return "atom-consume-and-explicit-split.xml";
27 }
28
29 @Override
30 protected void doSetUp() throws Exception
31 {
32 FunctionalTestComponent comp = (FunctionalTestComponent)getComponent("feedConsumer");
33 comp.setEventCallback(counter);
34 }
35
36 @Test
37 public void testConsume() throws Exception {
38
39 Thread.sleep(5000);
40 int count = counter.getCallbackCount();
41 assertTrue(count > 0);
42 Thread.sleep(5000);
43
44 assertEquals(count, counter.getCallbackCount());
45
46 }
47 }