ornl-epics / etherip

Java lib. for Ethernet/IP (AllenBradley ControlLogix, Compact Logix PLCs)
Eclipse Public License 1.0
111 stars 69 forks source link

Update to JUnit 5 and AssertJ #47

Closed codepitbull closed 2 months ago

codepitbull commented 2 months ago

Are you interested in a PR to update tests to use JUnit 5 ? I would also offer to replace Hamcrest with AssertJ (nicer, more readable fluent assertions, https://assertj.github.io/doc/), but that one would completely up to you if you want it :)

kasemir commented 2 months ago

Sure, update to JUnit 5 would be good.

As for ham crest or assertj, I'd prefer to avoid both and keep the dependencies minimal. In the end,

import static org.junit.jupiter.api.Assertions.assertEquals;
...
assertEquals("Foo", test_string);

is really sufficient.

Or if we feel really sophisticated, then

assertEquals("Foo", test_string, "Didn’t get expected result");
kasemir commented 2 months ago

Just updated to JU5 and removed the hamcrest dependency, thanks for the suggestion!