Open rohanKanojia opened 2 months ago
JKube Kit
Related to https://github.com/eclipse/jkube/issues/2316
VertxGeneratorIsApplicableTest seems to be using mock here :
https://github.com/eclipse-jkube/jkube/blob/dad4cc61149c435dbf91a5700a2c7f7cfe7d9a99/jkube-kit/jkube-kit-vertx/src/test/java/org/eclipse/jkube/vertx/generator/VertxGeneratorIsApplicableTest.java#L41
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/dad4cc61149c435dbf91a5700a2c7f7cfe7d9a99/jkube-kit/jkube-kit-vertx/src/test/java/org/eclipse/jkube/vertx/generator/VertxGeneratorIsApplicableTest.java#L59-L60
context = context.toBuilder() .project(project.toBuilder().plugins(pluginList).dependencies(dependencyList).build()) .build();
Usage of org.mockito.Mockito.mock and org.mockito.Mockito.when is removed from VertxGeneratorIsApplicableTest
org.mockito.Mockito.mock
org.mockito.Mockito.when
Usages of Mockito.mock and Mockito.when are removed from VertxGeneratorIsApplicableTest
Mockito.mock
Mockito.when
Hi @rohanKanojia, Can you assign this to me ?
Hi @manusa, can you assign this to me?
Component
JKube Kit
Task description
Component
JKube Kit
Task description
Related to https://github.com/eclipse/jkube/issues/2316
VertxGeneratorIsApplicableTest seems to be using mock here :
https://github.com/eclipse-jkube/jkube/blob/dad4cc61149c435dbf91a5700a2c7f7cfe7d9a99/jkube-kit/jkube-kit-vertx/src/test/java/org/eclipse/jkube/vertx/generator/VertxGeneratorIsApplicableTest.java#L41
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/dad4cc61149c435dbf91a5700a2c7f7cfe7d9a99/jkube-kit/jkube-kit-vertx/src/test/java/org/eclipse/jkube/vertx/generator/VertxGeneratorIsApplicableTest.java#L59-L60
Usage of
org.mockito.Mockito.mock
andorg.mockito.Mockito.when
is removed from VertxGeneratorIsApplicableTestExpected Behavior
Usages of
Mockito.mock
andMockito.when
are removed from VertxGeneratorIsApplicableTestAcceptance Criteria