Issue
I am writing unit test to test some converters in my app which has three languages. The test results depends from the value of the language.
For example, if the language is "en", I should expect one output, and if the language is "fr", I should expect different output.
Is it OK inside my test method annotated with @Test to make three calls to one method that receives language as method parameter, or should I duplicate my code and create three different test methods, each for a specific language?
Solution
Having separate tests for each language would give you better test reports, but you don't need to necessarily duplicate the code, create private methods inside the Test class and reuse them.
Answered By - cahen