Re: [junit] Latest JUnit 4.7 snapshot, includes Hamcrest 1.2

David Saff <[email protected]> Mon, 27 Jul 2009 22:06:03 -0400
Newsgroups gmane.comp.java.junit.devel,gmane.comp.java.junit.user
Message-ID <[email protected]>
Stefan,

I think that we changed things back for the final release--let me know
if that's the case.  Thanks,

   David Saff

On Fri, Jun 5, 2009 at 7:13 AM, Stefan Bodewig<[email protected]> w=
rote:
> On 2009-06-03, David Saff <[email protected]> wrote:
>
>> Stefan,
>
>> Logged here:
>
>> http://github.com/KentBeck/junit/issues#issue/9
>
>> I think I may have a solution, by following hamcrest's lead and
>> changing the signature of assertThat. =A0I'll release another snapshot
>> soon you can try.
>
> The snapshot still didn't do the trick and I think it is Hamcrest's
> Is.is(Class<T>) method. =A0The signature changed from
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Matcher<Object> is(java.lang.Class<?>)
>
> to
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<T> Matcher<? super T> is(Class<T>)
>
> I've changed XMLUnit's tests to use IsInstanceOf.instanceOf()
> explicitly instead of using the is() method and things compile and
> work correctly with both JUnit 4.6 and the 20090604 snapshot.
>
> Note that instanceOf also changed from
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Matcher<Object> instanceOf(Class<?>)
>
> to
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<T> Matcher<T> instanceOf(Class<?>)
>
> but it works (note it is still Class<?> in Hamcrest 1.2).
>
> BTW, if I compile the older test code using is() (XMLUnit svn trunk
> revision 342)
> <http://xmlunit.svn.sourceforge.net/viewvc/xmlunit/trunk/xmlunit/>
> against 4.6 and run them with the latests JUnit snapshot things work
> just fine - it's just the code doesn't compile using the snapshot.
>
> Stefan
>
> -------------------------------------------------------------------------=
-----
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Junit-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/junit-devel
>

---------------------------------------------------------------------------=
---
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day =

trial. Simplify your report design, integration and deployment - and focus =
on =

what you do best, core application coding. Discover what's new with =

Crystal Reports now.  http://p.sf.net/sfu/bobj-july