I know fluent APIs / method chaining are popular now, but I dislike them, for several reasons:
I find them harder to read on quick look. How to format long lines becomes ambiguous, so you get many style choices mixed into the source (we hit this in Lucene when we made the IndexWriterConfig class "fluent"). When many asserts are on one line it's not clear on quick inspection which assert failed, because the stack trace points to a line number and if that line has N asserts on it ... it requires some more work to determine which assert failed. So I prefer JUnit's one-assert-per-line approach. Mike McCandless http://blog.mikemccandless.com On Mon, Jan 20, 2014 at 7:19 AM, Stefano Fornari <stefano.forn...@gmail.com> wrote: > I actually understand a more open fork is available; it seems to be more > active than fest: assertj https://github.com/joel-costigliola/assertj-core > > HTH > Ste > > Ste > > > On Mon, Jan 20, 2014 at 10:10 AM, Hong-Thai Nguyen < > hong-thai.ngu...@polyspot.com> wrote: > >> Just syntax is much more fluent, nothing change with your IDE. >> More about Fest vs Junit: >> http://maciejwalkowiak.pl/blog/2012/03/23/better-unit-tests-with-fest-assert/ >> >> >> Hong-Thai >> >> >> -----Message d'origine----- >> De : Konstantin Gribov [mailto:gros...@gmail.com] >> Envoyé : samedi 18 janvier 2014 09:01 >> À : dev@tika.apache.org >> Objet : Re: Passing to FEST for JUnit tests ? >> >> Does it give something more than just fluent interface? Does it integrate >> to IDEs as good as JUnit? >> >> -- >> Best regards, >> Konstantin Gribov. >> >> >> 2014/1/17 Hong-Thai Nguyen <hong-thai.ngu...@polyspot.com> >> >> > Dear all, >> > >> > Fest (https://code.google.com/p/fest/ ) syntax is much intuitive than >> > JUnit : >> > assertEquals("result", gettingResult()); >> > by >> > assertThat(gettingResult(), is("result")); >> > >> > We may replace progressively in our tests. >> > >> > Hong-Thai >> > >> > >>