View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.module.rss;
8   
9   import org.mule.tck.junit4.FunctionalTestCase;
10  
11  import org.junit.Test;
12  
13  import static org.junit.Assert.assertTrue;
14  
15  public class RssFunctionalTestCase extends FunctionalTestCase
16  {
17  
18      @Override
19      protected String getConfigResources()
20      {
21          return "rss-test-config.xml";
22      }
23  
24      @Test
25      public void testRSS() throws Exception
26      {
27          if (isOffline(getClass().getName() + ".testRSS"))
28          {
29              return;
30          }
31  
32          //lets wait to read the feed
33          Thread.sleep(RECEIVE_TIMEOUT);
34          EntryReceiver component = (EntryReceiver) getComponent("rssTester");
35          assertTrue(component.getCount() > 2);
36  
37          EntryReceiver component2 = (EntryReceiver) getComponent("rssTester2");
38          assertTrue(component2.getCount() > 2);
39  
40          assertTrue(component.getCount() >= component2.getCount());
41      }
42  }