Suppose you have a class that calculates the area of a rectangle
(length * width). Your method signature probably looks like this:
public int CalculateArea(int width, int length)
Now, how that is implemented inside the method (including any private
methods it may call) are of no concern to your unit test. You just
want to write some unit tests so that if 5 and 8 are passed in, the
result is 40.
Remember, unit tests are used to test the behavior of a class, not the
implementation. If you test for implementation details, then changing
the implementation (like calling a web service to calculate the area)
will break your unit tests.
---
Patrick Steele
http://weblogs.asp.net/psteele
On Sun, Jan 9, 2011 at 1:04 AM, dotnetprogrammer2008
> --
> You received this message because you are subscribed to the Google Groups "Rhino.Mocks" group.
> To post to this group, send email to rhino...@googlegroups.com.
> To unsubscribe from this group, send email to rhinomocks+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rhinomocks?hl=en.
>
>