View Javadoc

1   /*
2    * $Id: RssFunctionalTestCase.java 20321 2010-11-24 15:21:24Z 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  
11  package org.mule.module.rss;
12  
13  import org.mule.tck.FunctionalTestCase;
14  
15  public class RssFunctionalTestCase extends FunctionalTestCase
16  {
17      @Override
18      protected String getConfigResources()
19      {
20          return "rss-test-config.xml";
21      }
22  
23      public void testRSS() throws Exception
24      {
25          if (isOffline(getClass().getName() + ".testRSS"))
26          {
27              return;
28          }
29  
30          //lets wait to read the feed
31          Thread.sleep(RECEIVE_TIMEOUT);
32          EntryReceiver component = (EntryReceiver) getComponent("rssTester");
33          assertTrue(component.getCount() > 2);
34  
35          EntryReceiver component2 = (EntryReceiver) getComponent("rssTester2");
36          assertTrue(component2.getCount() > 2);
37  
38          assertTrue(component.getCount() >= component2.getCount());
39      }
40  }