Hello,

I am trying to write a new Camel Component by extending the
ScheduledBatchPollingConsumer.

Its for the Amazon MWS Orders API, I now want to test it with a Mock
provided by Amazon in their download.

I cannot figure what I need to do to achieve this.

In my test class I have a setUp as follows.

public class MwsOrdersConsumerTest extends CamelTestSupport {

    private MwsOrdersEndpoint endpoint;

    @Before
    public void setUp() throws Exception {
        
        MwsOrdersConfiguration config = new MwsOrdersConfiguration();
        //set the MWS client to be the mock client provided
        config.setMWSOrdersClient(new MarketplaceWebServiceOrdersMock());
        endpoint = new MwsOrdersEndpoint("aws-mws-orders", new
MwsOrdersComponent(new     DefaultCamelContext()), config);
    }

Now I need a @Test routine that will trigger the poll() method of my new
Consumer. But at the moment I cannot see what needs to be done to do that?

I am copying the aws-sqs code, but its still not clear how that works to me.

Thanks

Steve Cameron





--
View this message in context: 
http://camel.465427.n5.nabble.com/Testing-new-ScheduledBatchPollingConsumer-tp5749038.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to