View Javadoc

1   /*
2    * $Id: FeedConsumeNoSplitTestCase.java 20320 2010-11-24 15:03:31Z dfeist $
3    * -------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  package org.mule.module.rss;
11  
12  import org.mule.tck.FunctionalTestCase;
13  import org.mule.tck.functional.CounterCallback;
14  import org.mule.tck.functional.FunctionalTestComponent;
15  
16  public class FeedConsumeNoSplitTestCase extends FunctionalTestCase
17  {
18      private final CounterCallback counter = new CounterCallback();
19  
20      @Override
21      protected String getConfigResources()
22      {
23          return "rss-consume-no-split.xml";
24      }
25  
26      @Override
27      protected void doSetUp() throws Exception
28      {
29          FunctionalTestComponent comp = (FunctionalTestComponent)getComponent("feedConsumer");
30          comp.setEventCallback(counter);
31      }
32  
33      public void testConsume() throws Exception {
34  
35          Thread.sleep(1500);
36          int count = counter.getCallbackCount();
37          //We just receive the feed, not split
38          assertTrue(count < 3);
39  
40      }
41  }