lundi 26 septembre 2016

Inject into mapper

I use Random class in my Mapper for some initialization. Now I want to perform integration tests on the processing pipeline and I was wondering is there a way to inject a mock of Random into Mapper during integration tests?

The only other way I see it to specify seed for the Random through Configuration in the Mapper.

Is there a way to do it using the first approach (injection), or should I stick to the other one (passing seed through Configuration)?

Aucun commentaire:

Enregistrer un commentaire