Re: Updates to NUnit 2.5

"Charlie Poole" <[email protected]> Fri, 4 Jul 2008 13:47:02 -0700
Newsgroups gmane.comp.windows.dotnet.nunit.devel
Message-ID <000301c8de17$1e738380$6401a8c0@ferrari>
Sounds like a good possibility, although it seems to share
with "Factory" the deficiency of not making much sense when
used without arguments.

Maybe I should leave the attribute off in that case...

What if 
  [Test]
  public void Method(int x, int y) { ... }
automatically searched for a factory within the class?

Would that lead to confusion?

Charlie 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On 
> Behalf Of Olof Bjarnason
> Sent: Friday, July 04, 2008 1:27 PM
> To: Charlie Poole
> Cc: [email protected]
> Subject: Re: [nunit-developer] Updates to NUnit 2.5
> 
> What about "Source"? Or maybe that's already taken?
> 
> 2008/7/4 Charlie Poole <[email protected]>:
> > I just updated the online documentation to match what's in CVS.
> > See for example:
> >   http://nunit.org/?p=testCase&r=2.5
> >   http://nunit.org/?p=factory&r=2.5
> >   http://nunit.org/?p=testCaseFactory&r=2.5
> >
> > I'm still looking for suggestions regarding renaming 
> FactoryAttribute.
> >
> > Charlie
> >
> >> -----Original Message-----
> >> From: [email protected]
> >> [mailto:[email protected]] On 
> Behalf Of 
> >> Charlie Poole
> >> Sent: Thursday, July 03, 2008 7:27 PM
> >> To: [email protected]
> >> Subject: Re: [nunit-developer] Updates to NUnit 2.5
> >>
> >> Hi All,
> >>
> >> Latest checkin finishes work on TestCaseFactories, which 
> are methods, 
> >> properties or fields that provide test cases to a 
> parameterized test. 
> >> There's one outstanding question I could use some ideas on 
> - see the 
> >> end of this note.
> >>
> >> TestCaseFactoryAttribute is an optional attribute that can 
> be used to 
> >> mark these factories. If used, it should specify the types of the 
> >> arguments provided... e.g.:
> >>   [TestCaseFactory(typeof(int), typeof(int), typeof(string))]
> >>
> >> FactoryAttribute is used on the parameterized test itself 
> and has the 
> >> following forms:
> >>   [Factory]
> >>   [Factory(Type factoryType)]
> >>   [Factory(string factoryNames)]
> >>   [Factory(Type factoryType, string factoryNames)]
> >>
> >> factoryType is the type of the object that holds the factory, 
> >> defaulting to the same class as the test.
> >>
> >> factoryName is the name of the method, property or field 
> that serves 
> >> as a factory - or several names separated by commas.
> >> It defaults to "find all compatible test factories in the type".
> >>
> >> If you are looking for compatible test factories, that's when you 
> >> need to mark them with the TestCaseFactoryAttribute.
> >> Compatible means that the types match the argumets of the 
> test method.
> >>
> >> Here's the question: I'm still not happy with "Factory" to 
> identify 
> >> indicate that factories should be used, especially the 
> form without 
> >> any arguments. MbUnit uses "UsesFactories"
> >> for a similar situation, so that might work. Any ideas?
> >> Note that we will want to use the same attribute on individual 
> >> arguments as well as on methods.
> >>
> >> Charlie
> >>
> >>
> >>
> >> --------------------------------------------------------------
> >> -----------
> >> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> >> Studies have shown that voting for your favorite open 
> source project, 
> >> along with a healthy diet, reduces your potential for chronic 
> >> lameness and boredom. Vote Now at
> >> http://www.sourceforge.net/community/cca08
> >> _______________________________________________
> >> nunit-developer mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/nunit-developer
> >>
> >
> >
> >
> > 
> ----------------------------------------------------------------------
> > --- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> > Studies have shown that voting for your favorite open 
> source project, 
> > along with a healthy diet, reduces your potential for 
> chronic lameness 
> > and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> > _______________________________________________
> > nunit-developer mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/nunit-developer
> >
> 
> --------------------------------------------------------------
> -----------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source 
> project, along with a healthy diet, reduces your potential 
> for chronic lameness and boredom. Vote Now at 
> http://www.sourceforge.net/community/cca08
> _______________________________________________
> nunit-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nunit-developer
> 



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08