/*
* $Id: HttpOnlyFeedConsumeAndSplitTestCase.java 20320 2010-11-24 15:03:31Z dfeist $
* -------------------------------------------------------------------------------------
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.module.rss;
import org.mule.tck.FunctionalTestCase;
import org.mule.tck.functional.CounterCallback;
import org.mule.tck.functional.FunctionalTestComponent;
public class HttpOnlyFeedConsumeAndSplitTestCase extends FunctionalTestCase
{
private final CounterCallback counter = new CounterCallback();
@Override
protected String getConfigResources()
{
return "http-only-consume-and-split.xml";
}
@Override
protected void doSetUp() throws Exception
{
FunctionalTestComponent comp = (FunctionalTestComponent)getComponent("feedConsumer");
comp.setEventCallback(counter);
}
public void testConsume() throws Exception {
Thread.sleep(4000);
int count = counter.getCallbackCount();
assertTrue(count > 0);
Thread.sleep(3000);
//We should only receive entries once
assertEquals(count, counter.getCallbackCount());
}
}