I'm putting us back on the list.
> The setupCount should be equaled to 2.
What *is* it equal to.
> The reason why I am doing this is because I need to access
> the Setup method in my tests. In Nunint 2.5, under the
> scenario I give, the setup method is completely bypassed.
> Since I have written a large amount of tests in this fashion,
> now all of the tests fail because the setup method is not called.
My question was what is the use case for overriding the a test
method in a base class. What are you trying to accomplish? Why
not simply have a different named method in the derived class?
Charlie
> Note that this problem only occurs when you have a debugger
> attached ( i.e, whether running in Testdriven.net or NUnit
> gui), if you don't have a debugger, then there is no such problem.
OK, we'll try to replicate the bug and see if we agree it's
a problem. But sometimes bugs don't get a very high priority
if we can't understand why a person would want to do a certain
thing. More explanation would help both us and you.
So we remember this, can you file a bug report please?Charlie
> BTW, it looks like using composition (taking a reference to
> the base class and then calling its methods through the
> reference) works just fine, so maybe that's the preferable
> route. Is that what everyone else does in this situation?
This is the way to achieve reuse below the level of a whole
test or setup method. It's also what you previously had to
do for setup and teardown before we introduced multiple levels
of setup/teardown in a hierarchy.
Charlie