Re: Key word suggestions?
"Charlie Poole" <[email protected]> Mon, 8 Sep 2008 11:43:23 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <00e301c911e2$c6ab0e70$6401a8c0@ferrari> |
Hi Olof,
A good idea... here are two sets using different constraints
Assert.That( data, Is.EqualTo(expected).Comparer(myComparer);
Assert.That( data, Is.EqualTo(expected).CompareWith(myComparer);
Assert.That( data, Is.EqualTo(expected).Using(myComparer);
Assert.That( data, Is.EqualTo(expected).UseComparer(myComparer);
etc.
and
Assert.That(myCollection, Is.OrderedBy("Key").Comparer(myComparer);
Assert.That(myCollection, Is.OrderedBy("Key").CompareWith(myComparer);
Assert.That(myCollection, Is.OrderedBy("Key").Using(myComparer);
Assert.That(myCollection, Is.OrderedBy("Key").UseComparer(myComparer);
etc.
Currently those are the only two places where this modifier is
used, but I see making more use of it in future. My working
assumption is that it will generally be easier for users
if we use the same word in all cases, even though they are
technically independent.
Charlie
> -----Original Message-----
> From: Olof Bjarnason [mailto:[email protected]]
> Sent: Monday, September 08, 2008 10:51 AM
> To: Charlie Poole
> Cc: [email protected]
> Subject: Re: [nunit-developer] Key word suggestions?
>
> Charlie could we get a complete line of sourcecode to make a
> better judgement..?
>
> 2008/9/6 Charlie Poole <[email protected]>:
> > Hi All,
> >
> > EqualConstraint takes a modifier "Comparer(IComparer
> comparer)", which
> > causes the specified IComparer to be used when testing for equality.
> >
> > This same feature is being added in other constraints, like
> > OrderedCollectionConstraint.
> >
> > Before we get too many of them, I want to ask if "Comparer"
> > is the best way to express this. Other options that come to mind are
> >
> > CompareWith(IComparer)
> > CompareUsing(IComparer)
> > UseComparer(IComparer)
> > Using(IComparer)
> > ...
> >
> > It's a smallish issue, but I thought I'd ask.
> >
> > 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=/