helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.49k stars 562 forks source link

Use Hamcrest assertions instead of JUnit #1749

Open tomas-langer opened 4 years ago

tomas-langer commented 4 years ago

Environment Details

Problem Description

Currently we have a few tests that still use JUnit assertions, such as assertEquals(actual, expected, "Test a and b are equal") all of these should be replaced with Hamcrest, such as: assertThat("Test a and b are equal", actual, is(expected)))

There are a few assertions we can use: fail("") assertAll() assertThrows

romain-grecourt commented 2 years ago

Two items have been fixed in helidon-3.x, and will need to be backported in 2.x:

Captain1653 commented 2 years ago

@romain-grecourt Can any contributor (not a member of helidon) do backport? I can try to do it. Are there any instructions for backport process in the documentation?

romain-grecourt commented 2 years ago

You can do a backport. There is no special process at the moment (though we've been working on one recently).

A git cherry-pick should do the trick.

Captain1653 commented 1 year ago

@romain-grecourt Should I backport all these PR into helidon-4.x ?

romain-grecourt commented 1 year ago

@romain-grecourt Should I backport all these PR into helidon-4.x ?

Yes, please !