James Thigpen
James Thigpen

Reputation: 869

Creating Tests at Runtime

Are there any .NET testing frameworks which allow dynamic creation of tests without having to deal with a hokey Attribute syntax?

Something like:

foreach (var t in tests)
{
  TestFx.Run(t.Name, t.TestDelegate);
}

But with the test reporting as you would expect...

I could do something like this with RowTests et al, but that seems hokey.

Upvotes: 2

Views: 48

Answers (2)

James Thigpen
James Thigpen

Reputation: 869

I found out how i can use parameterized tests to sorta do this here.

http://richarddingwall.name/2009/06/08/using-nunit-to-check-your-ioc-container-is-set-up-right/

Upvotes: 0

m0sa
m0sa

Reputation: 10940

I wonder if Pex would suite your needs...

Upvotes: 1

Related Questions