You'd only use one or the other, depending on your Java version.
If you're a 1.4 person, you'd use Ensure.that(...). If you're on Java 5,
you'd do a static import of Ensure and then have ensureThat(...)
available. Just don't spend too much time looking in the Ensure.java
file itself - you'll g
You already can. UsingMiniMock has exactly those methods. I just haven't
added them to Ensure yet.
Feel free to add them - it'll save me a small chore :)
Cheers,
Dan
Shane Duan wrote:
Ah. Thanks for the explanation.
Are we going to add it now? In this way, people who are using Java5
can us
Ah. Thanks for the explanation.
Are we going to add it now? In this way, people who are using Java5
can use this style right now.
On 12/5/06, Dan North <[EMAIL PROTECTED]> wrote:
That's what I meant - sorry, didn't explain it very well.
In Ensure we will have pairs of methods, called that(..
That's what I meant - sorry, didn't explain it very well.
In Ensure we will have pairs of methods, called that(...) and
ensureThat(...) for each signature. That way, 1.4 folks can do
Ensure.that(...), and 1.5 people can statically import Ensure and use
ensureThat(...).
Shane Duan wrote:
If
If someone using Java5 with static import, it will be something like
result.doesSomething();
that(result.status(), eq(status));
Are you sure that you don't want the following? I thought that the
old code read better.
result.doesSomething();
ensureThat(result.status(),
Hi Shane.
Annoyingly, we can't use Hamcrest because it's generics-based, and not
designed to be backward-compatible with java 1.4 (our target).
However, I'm creating an abstraction that will make sense to people who
understand Hamcrest, hence the vocabulary switch.
As a post-1.0 activity, I
hamcrest change, eh? :)
I had some fun/pain with it over the weekend.
http://agileworks.blogspot.com/2006/12/so-much-for-java-generics.html
On 5 Dec 2006 08:42:14 -, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
Revision 612 Author tastapod Date 2006-12-05 02:42:05 -0600 (Tue, 05 Dec
20