I would like to send parameters to a JTestCase.
My code is :
Result result = JUnitCore.runClasses(myclass.class);
and I need to send it a few parameters for the test. How can I do that ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no way
junitwill do this for you.You will have to take care of that yourself.
You could write a static method for
myclassthat accepts the parameters and makes them available for your test methods.