Discussion:
RFC: PropertyConstraint breaking change
Charlie Poole
2008-09-04 01:00:37 UTC
Permalink
Hi All,

As I go through the 2.4 Constraint syntax for the 2.5 release,
I'm finding some things I'd like to change. Here's one that
will call for editing of some tests, if you already use the
affected syntactic elements...

I plan to remove the following syntactic examples

Has.Property("X", value)
Has.Length(value)
Has.Count(value)

The new syntax is

Has.Property("x").EqualTo(value)
Has.Length.EqualTo(value)
Has.Count.EqualTo(value)

It's more verbose, but enables things you can't now
write, like

Has.Length.AtLeast(3)
Has.Message.Containing("xxxxx")

In addition, this change helps clean up one of the
dirtier bits of the implementation.

Silence means you don't care. :-)

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=/
Cory Foy
2008-09-04 03:09:05 UTC
Permalink
Hi Charlie,
Post by Charlie Poole
I plan to remove the following syntactic examples
Has.Property("X", value)
Has.Length(value)
Has.Count(value)
The new syntax is
Has.Property("x").EqualTo(value)
Has.Length.EqualTo(value)
Has.Count.EqualTo(value)
And sadly we can't mark the former as deprecated because there would be
a namespace collision. I guess we could if we were willing to do:

Has.Length().EqualTo(value)

And then next release go to the proposed syntax.

But I say that if no one has any objections, the latter seems clearer to me.
--
Cory Foy
http://www.cornetdesign.com
http://www.agileflorida.com


-------------------------------------------------------------------------
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=/
Charlie Poole
2008-09-04 03:53:00 UTC
Permalink
Hi Cory,
Post by Cory Foy
Post by Charlie Poole
I plan to remove the following syntactic examples
Has.Property("X", value)
Has.Length(value)
Has.Count(value)
The new syntax is
Has.Property("x").EqualTo(value)
Has.Length.EqualTo(value)
Has.Count.EqualTo(value)
And sadly we can't mark the former as deprecated because
there would be a namespace collision.
You got it! :-)
Post by Cory Foy
I guess we could if we
Has.Length().EqualTo(value)
And then next release go to the proposed syntax.
I hadn't thought of staging it like that. Of course,
it means everyone would have to edit their tests twice.
Post by Cory Foy
But I say that if no one has any objections, the latter seems
clearer to me.
That's my thought... unless some folks say "We use that in
a jazillion places and we can't change it because... "

I'm trying to get rid of F(void) as a pattern in the syntax
entirely. It's confusing if you're trying to look at it as
a DSL. In some cases, I can use two different words - for
example, Is.Ordered and Is.OrderedBy(...) but in this
case I can't make that work.

BTW, Property is one of two places where the syntax
is context-sensitive so there's a bit of unavoidable
messiness that my precedence matrix can't handle.
That's because you can write both
Has.Property(name)
and
Has.Property(name).EqualTo(xxx)
so I really like any simplification can.

The other place? Throws.Exception. :-)

Charlie
Post by Cory Foy
--
Cory Foy
http://www.cornetdesign.com
http://www.agileflorida.com
--------------------------------------------------------------
-----------
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
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=/
Sujin Han
2008-09-04 15:59:03 UTC
Permalink
Hi

After installing NUnit 2.4.7, running nunit-console.exe gave out this error:

"Could not load file or assembly 'nunit.framework, Version=2.4.7.0, Culture=neutral..."

Is this a known issue? Any workarounds to this?




-------------------------------------------------------------------------
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=/
Charlie Poole
2008-09-04 16:15:59 UTC
Permalink
That could be a lot of things, but since you just upgraded...

Possibly, NUnit is trying to load and run the last test program
loaded by the previous version of NUnit.

Possibly, you have removed the version of the nunit framework
assembly required by that program.

If so, either restore the version you removed, or recompile
your tests using the newer nunit framework as a reference.
NUnit makes no use at all of nunit.framework itself, but
obviously your tests do.

If this is not the case, you'll have to give more info.

Charlie
-----Original Message-----
Behalf Of Sujin Han
Sent: Thursday, September 04, 2008 8:59 AM
Subject: [nunit-developer] Could not load nunit.framework
Hi
After installing NUnit 2.4.7, running nunit-console.exe gave
"Could not load file or assembly 'nunit.framework,
Version=2.4.7.0, Culture=neutral..."
Is this a known issue? Any workarounds to this?
--------------------------------------------------------------
-----------
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
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=/

Loading...