Closed rohanKanojia closed 1 month ago
JKube Kit
Related to https://github.com/eclipse/jkube/issues/2316
WildflyJARGeneratorTest seems to be using mock here :
https://github.com/eclipse-jkube/jkube/blob/c2c9a0cdd076fbeb25087a6598b448b5271d6293/jkube-kit/jkube-kit-wildfly-jar/src/test/java/org/eclipse/jkube/wildfly/jar/generator/WildflyJARGeneratorTest.java#L57-L58
This can easily be refactored to use real object using lombok builders:
project = JavaProject.builder().build(); context = GeneratorContext.builder() .project(project) .build();
Similarly these when( statements can also be replaced with builder calls like this:
when(
https://github.com/eclipse-jkube/jkube/blob/c2c9a0cdd076fbeb25087a6598b448b5271d6293/jkube-kit/jkube-kit-wildfly-jar/src/test/java/org/eclipse/jkube/wildfly/jar/generator/WildflyJARGeneratorTest.java#L251-L254
context = context.toBuilder() .project(JavaProject.builder() .outputDirectory(temporaryFolder.toFile()) .plugins(Collections.emptyList()) .version("1.0.0") .build()) .build();
Usage of org.mockito.Mockito.mock and org.mockito.Mockito.when is removed from WildflyJARGeneratorTest
org.mockito.Mockito.mock
org.mockito.Mockito.when
Usages of Mockito.mock and Mockito.when are removed from WildflyJARGeneratorTest
Mockito.mock
Mockito.when
Hi, kindly assign this to me.
Component
JKube Kit
Task description
Related to https://github.com/eclipse/jkube/issues/2316
WildflyJARGeneratorTest seems to be using mock here :
https://github.com/eclipse-jkube/jkube/blob/c2c9a0cdd076fbeb25087a6598b448b5271d6293/jkube-kit/jkube-kit-wildfly-jar/src/test/java/org/eclipse/jkube/wildfly/jar/generator/WildflyJARGeneratorTest.java#L57-L58
This can easily be refactored to use real object using lombok builders:
Similarly these
when(
statements can also be replaced with builder calls like this:https://github.com/eclipse-jkube/jkube/blob/c2c9a0cdd076fbeb25087a6598b448b5271d6293/jkube-kit/jkube-kit-wildfly-jar/src/test/java/org/eclipse/jkube/wildfly/jar/generator/WildflyJARGeneratorTest.java#L251-L254
Usage of
org.mockito.Mockito.mock
andorg.mockito.Mockito.when
is removed from WildflyJARGeneratorTestExpected Behavior
Usages of
Mockito.mock
andMockito.when
are removed from WildflyJARGeneratorTestAcceptance Criteria