Closed MCMDEV closed 1 year ago
A unit test which checks that toBuilder().build()
equals the original object will suffice, with a mock on Enactor. You can place it in bans-core/src/test/java/
, in the same package to achieve package-private access.
I believe @KoxSosen was planning to add the mentioned unit tests. We're hoping to add this to 1.1.0 since it is an API addition, which requires a minor version increment.
That's correct, I have a part of the full test figured out in a local repository, however I didn't exactly get to completely finish my work. If someone wants to PR this in the mean time, that would be appreciated, otherwise I'll get to it eventually.
@KoxSosen Would you be able to push your changes to a visible separate branch? Then I can pick up where you left off, and credit everyone as co-authors on the resulting commit.
Pushed my changes to the add-test-builder branch in my fork. Thank you A248!
Merged with eeda7542e612f0cb160951e21e5a0181f25d65d8
This adds a convenience method to DraftPunishment to construct a new builder, copying all its properties. This PR in combination with https://github.com/A248/LibertyBans/pull/212 are to address https://github.com/A248/LibertyBans/issues/130 A unit test is still required, but I didn't really know where to put it. Some advise on that would be greatly appreciated. Javadoc could probably also be improved.