Mocking an SMS Gateway?
How do you mock a SMS gateway? To test a web service that sends outs SMS message through a SMS gateway, it'd be cheaper (& better) to mock the SMS gateway. I tried looking for some solutions but I just couldn't find any projects that mocked the SMS gateway service. 开发者_如何转开发Any pointers?
Creating a mock object from scratch shouldn't be complex at all for the SMS gateway. Mock it like you would mock any other web service. Have an endpoint that has an identical web method signature; have it do nothing - or log, and return appropriate status codes.
精彩评论