[Hawkular-dev] Assertj framework

Joel Takvorian jtakvori at redhat.com
Wed Sep 7 04:48:22 EDT 2016


I could find some info :) Here
<https://www.infoq.com/articles/JUnit-5-Early-Test-Drive> or there
<http://www.codeaffine.com/2016/02/18/junit-5-first-look/>

Basically JUnit5 will still react to assertion exceptions raised by
third-party frameworks so they'll continue to work.

Moreover, Junit5 doesn't aim to make existing assertion framework obsolete.
If you look at its new features (
http://junit.org/junit5/docs/current/user-guide/#writing-tests-assertions )
there's no big changes on the assertions. Third-party frameworks are still
valuable.


On Wed, Sep 7, 2016 at 10:03 AM, Michael Burman <miburman at redhat.com> wrote:

> Then again, JUnit5 is coming also with lambda support. Which is something
> we should migrate to as well. I don't know if it works with AssertJ, Google
> couldn't find any information. Lets try to avoid too many conflicts at
> least.
>
>   - Micke
>
> ----- Original Message -----
> From: "Joel Takvorian" <jtakvori at redhat.com>
> To: "John Mazzitelli" <mazz at redhat.com>, "Discussions around Hawkular
> development" <hawkular-dev at lists.jboss.org>
> Sent: Wednesday, September 7, 2016 10:42:37 AM
> Subject: Re: [Hawkular-dev] Assertj framework
>
> BTW groovy tests use junit assertions, so here also we could use assertj
> if we want to.
>
> On Wed, Sep 7, 2016 at 9:38 AM, Joel Takvorian < jtakvori at redhat.com >
> wrote:
>
>
>
> > never be sure if it's "expected, actual" or "actual, expected".
>
> It's an interesting point, because the assertj way is precisely solving
> this issue with its english-like fluent writing : "Assert that <something>
> [is / contains / matches / whatever] <some other thing>". It's quite clear
> in this sentence that the subject is <actual>, complement is <expected>.
> And you never have to worry about it anymore.
>
> About the testing libraries, if we try to analyse that:
>
> JUnit: can't get rid of it, however the JUnit assertions could eventually
> be gradually replaced with the ones of the preferred framework if we want
> absolute homogeneity (but do we really want it?)
> TestNG: same as above, could be gradually replaced
> Mockito: still useful, not overlapping
> Testing in Groovy: my guess is that it was interesting to use groovy for
> on the fly objects declaration, maybe among other benefits. It seems to
> suits quite well for integration test, no?
> I haven't found the scala tests yet :)
>
> So the overlapping parts are more on JUnit / TestNG, and Assertj if we
> come to add it. But comparing to junit/testng, assertj clearly brings nice
> facilities as I described above. IMHO there's no need to rewrite every
> tests, adopting a new assertion framework can be done just progressively,
> without forcing anybody to adopt it right here right now. It's just giving
> some more tools that can be very appreciated some day on a particular
> situation.
>
>
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hawkular-dev/attachments/20160907/aa5eafe8/attachment-0001.html 


More information about the hawkular-dev mailing list