You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Christofer Dutz <ch...@c-ware.de> on 2018/02/12 08:24:47 UTC
[DISCUSS] What assertion mechanism to use: JUnit, AssertJ or Hamcrest
Hi all,
I think as the discussion moved from the unit-test framework to the framework we create the assertions with, this deserves a dedicated discussion.
I think the options on the table are currently: JUnits on-board Assertions, AssertJ or Hamcrest.
I too am not very fond of the ordinary Junit assertions and I’ll add Niclas’ very helpful input to the topic.
Even if I like the way AssertJ handles exceptions a bit more than the Hamcrest way, I never was particularly fond of never-ending fluent expressions. So I would opt for the Hamcrest version.
What do you think?
Here’s the link to Niclas’ changeset again: https://github.com/niclash/incubator-plc4x/commit/2080c40c02249db5f5ec0cf0b37b0ea0524de922
Chris
Re: [DISCUSS] What assertion mechanism to use: JUnit, AssertJ or
Hamcrest
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi,
I currently have a strong tendency to accept Niclas' proposal as soon as he creates a pull-request for his changes.
So If I don't hear any objections within the next 1-2 days. I'll merge that.
Chris
Am 12.02.18, 09:51 schrieb "Justin Mclean" <ju...@classsoftware.com>:
Hi,
> Even if I like the way AssertJ handles exceptions a bit more than the Hamcrest way, I never was particularly fond of never-ending fluent expressions. So I would opt for the Hamcrest version.
No strong view either way as any tests are good to have :-) But I have used Hamcrest in the past and that’s what I’m familiar with. Niclas’ change looks good to me.
Thanks,
Justin
Re: [DISCUSS] What assertion mechanism to use: JUnit, AssertJ or
Hamcrest
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
> Even if I like the way AssertJ handles exceptions a bit more than the Hamcrest way, I never was particularly fond of never-ending fluent expressions. So I would opt for the Hamcrest version.
No strong view either way as any tests are good to have :-) But I have used Hamcrest in the past and that’s what I’m familiar with. Niclas’ change looks good to me.
Thanks,
Justin