[
https://issues.apache.org/jira/browse/CALCITE-2457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16575175#comment-16575175
]
Andrei Sereda commented on CALCITE-2457:
----------------------------------------
I guess the advantage is that you can [write
your|http://google.github.io/truth/extension.html#writing-your-own-custom-subject]
"comparator" on the top of existing framework, which already gives you nice
messages and extensions.
To sum up, why *I think* assertion framework is better than current JUnit +
AssertQuery + Sql.ok() :
For standard types (primitive, number, collection API, Stream, Optional etc.)
it has better error (debug) messages and fluent API. See [Known
Types|http://google.github.io/truth/known_types]
For custom types (AssertQuery, Sql.ok()) you can write custom Subject to
integrate with the framework.
The downside: yet another library to learn/integrate/use.
> 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
> Attachments: assert_equals.png, truth_assertmap.png
>
>
> 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.
> Relevant features of JUnit 5: dynamic test, nested tests, parameterized tests
> https://twitter.com/nipafx/status/1027095088059559936
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)