Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VertxGeneratorIsApplicableTest : Replace Mockito.mock by creating actual object #3405

Open
1 task
rohanKanojia opened this issue Sep 25, 2024 · 2 comments
Open
1 task
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@rohanKanojia
Copy link
Member

Component

JKube Kit

Task description

Component

JKube Kit

Task description

Related to #2316

VertxGeneratorIsApplicableTest seems to be using mock here :

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(project.getPlugins()).thenReturn(pluginList);
when(project.getDependencies()).thenReturn(dependencyList);

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

Expected Behavior

Usages of Mockito.mock and Mockito.when are removed from VertxGeneratorIsApplicableTest

Acceptance Criteria

  • mock statements are replaced via real variables
@rohanKanojia rohanKanojia added good first issue Good for newcomers help wanted Extra attention is needed labels Sep 25, 2024
@kanumalivad
Copy link
Contributor

Hi @rohanKanojia, Can you assign this to me ?

@Adarsha186
Copy link
Contributor

Hi @manusa, can you assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants