rewrite-testing-frameworks icon indicating copy to clipboard operation
rewrite-testing-frameworks copied to clipboard

Add unit tests for JMockit Delegate to mockito migration. Also add test case for comments

Open shivanisky opened this issue 1 year ago • 1 comments

At the moment, JMockit Delegates are not migrated to mockito. What I'm seeing is that they are being trashed with the template being printed out. These tests were written to try to replicate this issue, however I was unable to. They may help anyone adding the feature for Delegate migration.

https://javadoc.io/doc/org.jmockit/jmockit/latest/mockit/Delegate.html

Also added one test case showing comments are not preserved.

I am wondering if it's better to have the test cases failing with the expected output and to disable them. Please let me know if that's preferred.

Anyone you would like to review specifically?

@timtebeek @tinder-dthomson

Checklist

  • [ ] I've added unit tests to cover both positive and negative cases
  • [ ] I've read and applied the recipe conventions and best practices
  • [ ] I've used the IntelliJ IDEA auto-formatter on affected files

shivanisky avatar Jul 28 '24 04:07 shivanisky

Thanks for the continued work on this! Indeed probably best to have the tests fail with the actual expected output, as opposed to documenting the status quo. No need to mark them @Disabled just yet, we can do that just before a merge if we want to delay any work towards this, and then have the tests reference an open issue with more information.

timtebeek avatar Jul 28 '24 08:07 timtebeek