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