Add mappings from imports, methods and annotations to support JUnit test conversions#124
Conversation
|
This looks great, thank you! Can you please include in your PR an update to the README with a new section on how to use this, as well as a possible example file like you started on to convert junit tests to Xunit? Thanks! |
|
@paulirwin Thank you for your work in this project. Currently I'm working on migrating conversion of a few repos from Sharpen to JavaToCSharp and the converssion with JavaToCSharp is pretty much straightforward than when using Sharpen (which is semantic), and requires the same amount of postprocessing of the resulting C#. I've included some instructions and a simple example (like the one in this PR). If you want to include a more complex file, this is one that I'm working on (converts Selenium and JUnit4 into NUnit4) |
|
That is awesome, thanks! I love the idea of a custom mapping file, this will be great for projects with a lot of custom code that needs to be mapped. Glad the project helps! |
This PR Closes #118 to enable the conversion of JUnit tests. This is done by converting the test annotations, imports and assert methods using a collection of mappings that are read from an optional external file.
The submitted PR includes two commits (please, tell me if you prefer to submit it as two separate sequential PRs):
A new optional CLI option
--mappings-filespecifies the mappings file for imports, annotations and methods (either void or non void). Example:For example, this junit4 test:
is converted using the above mappings to: