Syntax Layer Changes

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.devel
Message-ID <007d01c877d5$df6b4df0$6401a8c0@ferrari>
Hi All,

One of the conclusions I reached from experimentation with the 2.4
Assert.That syntax is that there are lots of different opinions and
that what works for one programming language doesn't work for others
quite as smoothly. For example, the Is/Has family of helpers don't
work well in C++.

So for 2.5 I'm trying to separate out the syntax into various namespaces,
allowing for various language families and for the creation of alternative
syntaxes by other folks.

What I've come up with so far is to replace the old SyntaxHelpers namespace
with a tree of namespaces rooted in NUnit.Framework.Syntax. Right now,
I have NUnit.Framework.Syntax.CSharp, which contains all the 2.4 stuff, with
the classes in NUnit.Framework.SyntaxHelpers inheriting from the new ones
for compatibility.

My basic idea is that /without/ any of the Syntax classes, you could use the

classic asserts or Assert.That with "new SomeTypeOfConstraint()" as an
argument. 
If you want to create an extension-based syntax, a C++ syntax, a BDD syntax,
etc. 
then it would go into a sub-namespace of Syntax.

This is all just a first cut. What would you like to see?

Charlie



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.