Re: Recent 2.5 Changes
"Charlie Poole" <[email protected]> Mon, 28 Jul 2008 15:19:37 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <001001c8f100$08390df0$6401a8c0@ferrari> |
Hi Olof, I missed seeing part of your note the first time... > > 3. TestFixtures can now have parameters, which are used in > searching > > for a constructor. You repeat [TestFixture(...)] just as you do for > > [TestCase(...)] and each individualized fixture is created > separately > > in the tree. > > Cool! So if I have several classes implementing an interface > that should adhere to specific rules specified by tests, I > could parameterize the fixture containing those tests with > the specific class implementations? Great! Exactly. Of course, #4 makes it even cooler! > > > > 4. We already had generic fixtures and now they can have parameters > > too. You can specify what types to use in creating a specific class > > from the generic declaration in three ways... > > I have no clue what you are talking about, but I guess it's great ;) "types to use" == "type arguments" == "stuff you would normally put in angle brackets" :-) If this seems roundabout, it is, but it as to be because .NET doesn't allow attributes to be generic. > > > > 1) By preceding the constructor args with a set of > > Types to be used. This won't work if the first > > constructor arg is a Type, of course. > > > > 2) By using the TypeArgs named property of TestFixtureAttribute > > > > 3) By using a constructor that makes use of all the > > Type parameters - in that case NUnit will figure > > it out. > > > > I'm aware that the last bit particuarly needs documentation. > > Consider the above as hints for the brave among you. > > > > Charlie > > > > > > > > > > > > > ---------------------------------------------------------------------- > > --- This SF.Net email is sponsored by the Moblin Your Move > Developer's > > challenge Build the coolest Linux based applications with > Moblin SDK & > > win great prizes Grand prize is a trip for two to an Open > Source event > > anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > nunit-developer mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/nunit-developer > > > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge Build the coolest Linux based > applications with Moblin SDK & win great prizes Grand prize > is a trip for two to an Open Source event anywhere in the > world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > nunit-developer mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nunit-developer > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/