Hi all, Currently I'm working on the unit testing for twitter inbound . When onStatus[1] method is called, it checks whether the provided credentials are valid or not. Then it will inject the message into the esb sequence [2]. So we need to mock the onStatus method, but when we tried to mock that method, injectTwitterMessage(TwitterObjectFactory.getRawJSON(status)) method will not be executed. So we can't get the injected message from the sequence. In this situation how can we assert in test cases?
[1] https://github.com/wso2-extensions/esb-inbound-twitter/blob/master/src/main/java/org/wso2/carbon/inbound/twitter/poll/TwitterStreamData.java#L356 [2] https://github.com/wso2-extensions/esb-inbound-twitter/blob/master/src/main/java/org/wso2/carbon/inbound/twitter/poll/TwitterStreamData.java#L357 Regards, Hamsavasini Vasan Associate Software Engineer WSO2 Inc : http://wso2.org Mobile : +94776176728 <+94%2077%20617%206728> LinkedIn : www.linkedin.com/in/hamsavasan
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
