[Mono-devel-list] Detecting Mono
richard.torkar at htu.se
Mon Feb 16 15:55:06 EST 2004
On Mon, 2004-02-16 at 21:28, Ben Maurer wrote:
> On Mon, 2004-02-16 at 13:57, Charlie Poole wrote:
> > However, the same app would probably have a unit test for it's registry
> > access code. That test would only be run in the win32 environment. If
> > you're not heavily into unit testing and particulary TDD, this may not
> > make sense. However, a large part of the Nunit user community is into
> > those things and so are the developers. :-)
> I don't really think that is valid. Tests should probe how the code
> works on the *outside* not the inside. For example, you would not write
> a test that used Reflection to get the fields of a class and test if
> they were set to the right value. You would use a publicly exposed API.
> Likewise, you shouldnt go about probing the storage format of your
> Tests really shouldnt assert things about how the code looks inside.
Depends on what test methodology you use.
What you are talking about Ben is a pure black-box approach. If that is
the case - then sure! But if you have a white-box approach or a mixture
between bb and wb then it is very valid to "look inside the box".
Everyone who has tested anything more than a simple Hello World
application knows that a pure black-box approache does not catch all
faults. Usually one uses several different methodologies and techniques
- but you know that Ben ;-)
More information about the Mono-devel-list