Re: Data-driven Tests in NUnit 2.5

"Kelly Anderson" <[email protected]> Mon, 24 Mar 2008 09:58:24 -0600
Newsgroups gmane.comp.windows.dotnet.nunit.devel
Message-ID <[email protected]>
On Fri, Mar 21, 2008 at 8:40 PM, Charlie Poole
<[email protected]> wrote:
> Hi Kelly,
>
>  > >  This isn't about Theory, it's about Data-driven tests in
>  > NUnit 2.5.
>  >
>  > Ok, but the point is still that if the data generation is far
>  > away from the data test, it makes the code harder to read. If
>  > it's a function in the TestFixture class, that ensures that
>  > it's fairly close to the TestCase that's being run. That's
>  > the only point I was trying to make. Putting the data
>  > generation code in another class may mean you have to read
>  > more code to understand the nature of the Test.
>
>  Point taken. However, the issue is more important IMO with Theory
>  and less so with standard data-driven tests, where all the data
>  is presumed to be correct - and may come from a file anyway.

After the original Red run, I would think that you would presume your
Theory would always be correct too... :-)

It's clearly very important to have the data "close" to your Theory
for readability.

-Kelly

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/