You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a BlockJUnit4ClassRunner implementation for Guice, I'm using Guice to construct fresh instances of the test class in createTest, however I'd like to customise the environment passed in for each test method (at the minute I can only customise it per test class). In order to have enough information to do this I would need to have a variant of createTest() that takes a FrameworkMethod (or to override methodBlock(FrameworkMethod) myself).
I can't do either of these, because when overriding methodBlock(FrameworkMethod) one of the methods I need to call, withRules(FrameworkMethod,Object,Statement), is private.
If what I'm doing isn't recommended can you recommend an alternative approach?
The text was updated successfully, but these errors were encountered:
Adding an override of createTest() that takes a FrameworkMethod (and calls the existing createTest() method) sounds reasonable. Can you send us a pull?
I have a
BlockJUnit4ClassRunner
implementation for Guice, I'm using Guice to construct fresh instances of the test class increateTest
, however I'd like to customise the environment passed in for each test method (at the minute I can only customise it per test class). In order to have enough information to do this I would need to have a variant ofcreateTest()
that takes aFrameworkMethod
(or to overridemethodBlock(FrameworkMethod)
myself).I can't do either of these, because when overriding
methodBlock(FrameworkMethod)
one of the methods I need to call,withRules(FrameworkMethod,Object,Statement)
, is private.If what I'm doing isn't recommended can you recommend an alternative approach?
The text was updated successfully, but these errors were encountered: