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

Migrate VerificationsInOrder #749

Open
3 of 4 tasks
AnithaPerumalsamy opened this issue Oct 11, 2024 · 0 comments
Open
3 of 4 tasks

Migrate VerificationsInOrder #749

AnithaPerumalsamy opened this issue Oct 11, 2024 · 0 comments

Comments

@AnithaPerumalsamy
Copy link

AnithaPerumalsamy commented Oct 11, 2024

Please provide the following information:

  • Version of JMockit that was used: 1.49

  • Description of the problem or enhancement request: When using open rewrite to convert jmockit to mockito framework, getting the following error - Caused by: java.lang.RuntimeException: Error while visiting itom-di-platform\itom-di-tenant-management\src\test\java\com\swgrp\itomdi\tenantmanagement\i
    nit\TenantManagementApplicationInitializerTest.java: java.lang.IllegalArgumentException: No enum constant org.openrewrite.java.testing.jmockit.JMockitBl
    ockType.VerificationsInOrder
    java.base/java.lang.Enum.valueOf(Enum.java:273)
    org.openrewrite.java.testing.jmockit.JMockitBlockType.valueOf(JMockitBlockType.java:20)
    org.openrewrite.java.testing.jmockit.JMockitUtils.getJMockitBlock(JMockitUtils.java:46)
    org.openrewrite.java.testing.jmockit.SetupStatementsRewriter.rewriteMethodBody(SetupStatementsRewriter.java:41)
    org.openrewrite.java.testing.jmockit.JMockitBlockToMockito$RewriteJMockitBlockVisitor.visitMethodDeclaration(JMockitBlockToMockito.java:66)
    org.openrewrite.java.testing.jmockit.JMockitBlockToMockito$RewriteJMockitBlockVisitor.visitMethodDeclaration(JMockitBlockToMockito.java:56)
    org.openrewrite.java.tree.J$MethodDeclaration.acceptJava(J.java:3651)
    org.openrewrite.java.tree.J.accept(J.java:59)
    org.openrewrite.TreeVisitor.visit(TreeVisitor.java:248)
    org.openrewrite.TreeVisitor.visitAndCast(TreeVisitor.java:318)
    org.openrewrite.java.JavaVisitor.visitRightPadded(JavaVisitor.java:1365)
    org.openrewrite.java.JavaVisitor.lambda$visitBlock$4(JavaVisitor.java:397)
    org.openrewrite.internal.ListUtils.map(ListUtils.java:176)
    org.openrewrite.java.JavaVisitor.visitBlock(JavaVisitor.java:396)
    org.openrewrite.java.JavaIsoVisitor.visitBlock(JavaIsoVisitor.java:88)
    org.openrewrite.java.JavaIsoVisitor.visitBlock(JavaIsoVisitor.java:30)
    ...

I am using maven as build tool. JDK 17

  • Check the following:
  • If a defect or unexpected result, JMockit project members should be able to reproduce it.
    For that, include an example test (perhaps accompanied by a Maven/Gradle build script) which
    can be executed without changes and reproduces the failure.

  • If an enhancement or new feature request, it should be justified by an example test
    demonstrating the validity and usefulness of the desired enhancement or new feature.

  • The issue does not fall outside the scope of the project (for example, attempting to use
    JMockit APIs from Groovy or Scala code, or with an Android runtime).

  • The JDK where the problem occurs is a final release, not a development build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant