Re: Updates to NUnit 2.5
"Charlie Poole" <[email protected]> Tue, 24 Jun 2008 14:59:48 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <001701c8d645$a0102800$6401a8c0@ferrari> |
More updates for those following CVS - note that the attached emails cover all the important changes since the Alpha 2 release, and will be reflected in the next Alpha in a few weeks. There is a major change to the Test hierarchy: TestCase doesn't exist any longer. TestMethod inherits directly from Test now and represents a Test implemented by a method. There could be some further changes in this branch as well as for TestSuite, TestFixture, etc. All this is part of the move to parameterized tests, which blurs the distinction between a suite and a case. I'm currently using "test case" to refer to a single execution of a test with one set of parameters, producing one result and the class names will begin to reflect that. NUnitTestCaseBuilder is now split in two, with the original builder handling "regular" tests and ParameterizedTestCaseBuilder handling parameterized tests. A new DynamicTestBuilder, which recognizes DynamicTestAttribute and creates DynamicTests is Charlie > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On > Behalf Of Charlie Poole > Sent: Sunday, June 22, 2008 9:29 AM > To: [email protected] > Subject: Re: [nunit-developer] Updates to NUnit 2.5 > > More updates checked into CVS. All of this will be documented > for the release, but some of you may want an early heads-up, > especially if you are working on addins. > > EXTENSIBILITY > > The ParameterProviders extension point has been renamed to > TestCaseProviders. The interface that extensions must > implement is now ITestCaseProvider. Here's the definition: > > public interface ITestCaseProvider > { > bool HasTestCasesFor(MethodInfo method); > IEnumerable GetTestCasesFor(MethodInfo method); > } > > This is essentially the same as the IParameterProvider > interface in the first two alphas. > > BUILT-IN PARAMETERIZED TESTS > > NUnit currently has two built-in providers: > TestCaseParameterProvider for TestCaseAttribute and > TestCaseFactoryProvider for FactoryAttribute. > > TestCaseParameterProvider will perform a number of > conversions in order to make the provided argument compatible > with method call. > > TestCaseFactoryProvider can work with properties, methods and > fields that implement IEnumerable. For static cases, use of > an array is the simplest approach. Either static or instance > members may be used. For methods takin a single ValueType > argument, the enumerator may return the bare argument rather > than an array with one member. > > All of the above work at load time. For dynamic test cases, > provided at the instance of executin the test and possibly > varying from run to run, I plan to add DynamicTest and > DynamicTestCaseProvider. > > OTHER STUFF > > The RequiredAddinAttribute may be placed on the assembly, on > a class or on a method. If the named addin is not loaded, the > test or suite is NotRunnable and shows up as red in the Gui. > > Charlie > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf Of > > Charlie Poole > > Sent: Monday, June 16, 2008 12:14 PM > > To: [email protected] > > Subject: [nunit-developer] Updates to NUnit 2.5 > > > > Hi All, > > > > Now that I'm back home, I can properly upload a number of changes I > > made on my laptop while travelling. > > > > So far, I have made the following changes: > > > > 1. The release is now 2.5 Alpha 3. > > > > 2. I have changed DataSourceAttribute to FactoryAttribute > and it may > > now appear on a property, field or method. Any of these may > be either > > static or instance members. > > > > 3. IParameterProvider.GetParametersFor(MethodInfo method) > now returns > > IEnumerable rather than IList. > > > > 4. The Test abstract class now has default implementations > for several > > properties that were previously abstract. One of the > > Run() overloads has been removed. > > > > I'll post further as more changes are made. > > > > Charlie > > > > > > > > > > -------------------------------------------------------------- > > ----------- > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for just about anything > > Open Source. > > http://sourceforge.net/services/buy/index.php > > _______________________________________________ > > nunit-developer mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/nunit-developer > > > > > > -------------------------------------------------------------- > ----------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for just about > anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > nunit-developer mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nunit-developer > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php