mardi 28 juillet 2015

How to use JUnit4TestAdapter with objects

I am trying to write a test suite using JUnit4 by relying on JUnit4TestAdapter. Having a look at the code of this class I saw that it only works with a Class as input. I would like to build a test class and set a parameter on it before running it with my TestSuite. Unfortunately, Junit4TestAdapter is building the test by using reflection (not 100% sure about the mechanism behind it), which means that I cannot change my test class on runtime. Has anybody done anything similar before? Is there any possible workaround to this issue? Thanks for your help!

Aucun commentaire:

Enregistrer un commentaire