2

Is it possible to test private methods of a web service, during api testing? If yes, how to differentiate public methods and private methods? I am using the object browser in VSTS to see the list of methods available.


wattostudios
  • 8,666
  • 13
  • 43
  • 57
Anil
  • 665
  • 1
  • 10
  • 14
  • 1
    The question is currently a bit out of context. Try to add “.net” tag to get more attention – nkrkv Apr 09 '10 at 09:08

1 Answers1

1

When you write private method, it means that this method will be used by public methods of your service. And when you test public methods you automaticly test private methods.

I think you should not test private methods because you should test only bahaviour (API) of library/web service, and it is enough for full coverage of work cases. But may be it will be more difficult for debug.

Also you can read this answer for same question.

One more thread.

Community
  • 1
  • 1
Pavel Belousov
  • 1,848
  • 2
  • 14
  • 22