3 added 304 characters in body
source | link

Mocking isn't about inputs or outputs its about replacing external dependencies. So yes it is appropriate to write unit tests and mock out the external web services.

Now for the bad news: depending on the language and tooling available to you you may not be able to mock out the external dependencies unless the code has been designed to allow you to. If this is the case then you will find your tests actually turn into little integration tests rather then pure unti tests.

On the plus side it looks like you are alowed to modify the code (else how are you commenting it out) pass in an interface to your service to allow it to be mocked out (or use some other form of dependency injection)

Finally, what you are wanting to test appears to be a pure wrapper around the external service, there is almost nothing to unit test here other than that you call the service. As this is fundamentally an interface most of the testing will have to be done later at a higher level (integration testing)

Mocking isn't about inputs or outputs its about replacing external dependencies. So yes it is appropriate to write unit tests and mock out the external web services.

Now for the bad news: depending on the language and tooling available to you you may not be able to mock out the external dependencies unless the code has been designed to allow you to. If this is the case then you will find your tests actually turn into little integration tests rather then pure unti tests.

On the plus side it looks like you are alowed to modify the code (else how are you commenting it out) pass in an interface to your service to allow it to be mocked out (or use some other form of dependency injection)

Mocking isn't about inputs or outputs its about replacing external dependencies. So yes it is appropriate to write unit tests and mock out the external web services.

Now for the bad news: depending on the language and tooling available to you you may not be able to mock out the external dependencies unless the code has been designed to allow you to. If this is the case then you will find your tests actually turn into little integration tests rather then pure unti tests.

On the plus side it looks like you are alowed to modify the code (else how are you commenting it out) pass in an interface to your service to allow it to be mocked out (or use some other form of dependency injection)

Finally, what you are wanting to test appears to be a pure wrapper around the external service, there is almost nothing to unit test here other than that you call the service. As this is fundamentally an interface most of the testing will have to be done later at a higher level (integration testing)

2 added 220 characters in body
source | link

Mocking isn't about inputs or outputs its about replacing external dependencies. So yes it is appropriate to write unit tests and mock out the external web services.

Now for the bad news: depending on the language and tooling available to you you may not be able to mock out the external dependencies unless the code has been designed to allow you to. If this is the case then you will find your tests actually turn into little integration tests rather then pure unti tests.

On the plus side it looks like you are alowed to modify the code (else how are you commenting it out) pass in an interface to your service to allow it to be mocked out (or use some other form of dependency injection)

Mocking isn't about inputs or outputs its about replacing external dependencies. So yes it is appropriate to write unit tests and mock out the external web services.

Now for the bad news: depending on the language and tooling available to you you may not be able to mock out the external dependencies unless the code has been designed to allow you to. If this is the case then you will find your tests actually turn into little integration tests rather then pure unti tests.

Mocking isn't about inputs or outputs its about replacing external dependencies. So yes it is appropriate to write unit tests and mock out the external web services.

Now for the bad news: depending on the language and tooling available to you you may not be able to mock out the external dependencies unless the code has been designed to allow you to. If this is the case then you will find your tests actually turn into little integration tests rather then pure unti tests.

On the plus side it looks like you are alowed to modify the code (else how are you commenting it out) pass in an interface to your service to allow it to be mocked out (or use some other form of dependency injection)

1
source | link

Mocking isn't about inputs or outputs its about replacing external dependencies. So yes it is appropriate to write unit tests and mock out the external web services.

Now for the bad news: depending on the language and tooling available to you you may not be able to mock out the external dependencies unless the code has been designed to allow you to. If this is the case then you will find your tests actually turn into little integration tests rather then pure unti tests.