Remove org.mockito
references from EnricherConfigTest
#2597
Labels
Milestone
org.mockito
references from EnricherConfigTest
#2597
Component
JKube Kit
Task description
Description
Related to #2316
We have this simple test EnricherConfigTest that seems to be using mock for EnricherContext:
https://github.com/eclipse/jkube/blob/7561af9a2b36892b6c93863584d62d732e76938a/jkube-kit/enricher/api/src/test/java/org/eclipse/jkube/kit/enricher/api/EnricherConfigTest.java#L39
We are trying to make our tests more robust by replacing them with simple objects created using builders. We should refactor this test to not use mock.
This statement:
https://github.com/eclipse/jkube/blob/7561af9a2b36892b6c93863584d62d732e76938a/jkube-kit/enricher/api/src/test/java/org/eclipse/jkube/kit/enricher/api/EnricherConfigTest.java#L39
could be rewritten like this using builders:
Refactor this test to use builders instead of
mock
andwhen
statements.Also, this suppression doesn't seem to be applicable anymore, it's better to remove it :
https://github.com/eclipse/jkube/blob/7561af9a2b36892b6c93863584d62d732e76938a/jkube-kit/enricher/api/src/test/java/org/eclipse/jkube/kit/enricher/api/EnricherConfigTest.java#L36
Expected Behavior
mock
andwhen
statements are replaced by builders setting actual objects inside builder methods.Acceptance Criteria
@SuppressWarnings("ResultOfMethodCallIgnored")
annotation from testBefore you start 🔴
👇 👇 👇 👇 👇 👇 👇 👇 👇 👇👇👇👇👇👇👇
Make sure you read the contributing guide first. Pay special attention to the ECA agreement section and the requirement to sign-off your commit.
The text was updated successfully, but these errors were encountered: