|
From: Nat P. <nat...@gm...> - 2006-03-20 20:29:10
|
Hi all. I committed the changes to make EqualMatchers do the right
thing when given a list. I've also made them do the right thing when
passed multidimensional arrays. This uncovered some nasty
incompatabilities between Microsoft's and Mono's implementation of
arrays in the compiler and VM. We need to get the mono version under
continuous integration to catch these things. What's happening about
that?
Also, I modified the 'advanced' tutorial to show how to extend the DSL
when writing custom matchers and stubs.
I want to (re)emphasise the whole DSL thing. The point of the NMock-2
API is to keep the test code as clear as possible so that it is easy
to maintain when you come back to it months or years after the fact,
or when you have to maintain other people's code. The API is designed
to be a domain-specific language and we (in the jMock team) went to
great pains to design a language that can be embedded in a crappy
language and *seamlessly* extended by the user.
Not all jMock users get the idea of making tests readable or writing
them to be specifications. Very few C# programmers do. It's important
to publicise this idea and demonstrate how it is done in all the
NMock-2 documentation and codebase. We have to lead by example, if
only to reduce support effort when confused users send us code
snippets.
So when writing documentation, please show the extension points being
used to extend the DSL syntax and avoid whimsical example code
("kissable" and whatnot) in the tests. It really will make support
much easier in the long run.
--Nat.
|