[ 
https://issues.apache.org/jira/browse/CALCITE-2457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16573433#comment-16573433
 ] 

Andrei Sereda commented on CALCITE-2457:
----------------------------------------

[~vladimirsitnikov] 

1) Perhaps it is personal preference but I find Truth / AssertJ to have a much 
richer API for testing collections, maps, strings etc. Also error reporting is 
human friendly :
{code:java}
assertThat("foo").contains("bar"); // message: not true that "foo" contains 
"bar"
assertTrue("foo".contains("bar")); // message: assertion failed
{code}
2) In Truth there is a notion of [custom 
Subjects|http://google.github.io/truth/extension] which allows you to define 
custom assertions  (eg. AssertQuery).
{code:java}
assertThat(query).returns("EXPR$0=1111", "EXPR$0=2222").inOrder();
{code}
If you plan to use Kotlin then discussion changes a lot.
 3) They all throw AssertionError which is interpreted by IDE the same way. If 
I remember correctly strings diffs
 are also shown correctly by the IDE.

Overall this is a minor point and I don't feel religious about it. Wanted to 
know the opinion of calcite devs on the topic.
  

> Upgrade to JUnit 5
> ------------------
>
>                 Key: CALCITE-2457
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2457
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Vladimir Sitnikov
>            Assignee: Julian Hyde
>            Priority: Major
>
> JUnit 5 brings multiple useful features so tests are easier to read and write.
> Is there something that blocks upgrading to JUnit 5?
> By upgrade I mean bumping up the dependency version and creating new tests 
> with JUnit 5 features.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to