8 Replies Latest reply: Apr 19, 2012 7:52 AM by Bernard Labno RSS

    @Inject'able attributes not available for TestWatchman

    Bernard Labno Master

      Hi,

      Sometimes I need to write some functionality that runs before each test and is aware of which test method it runs (JUnit4). So I'm using TestWatchman for that, but @Inject'able attributes are null whet "public void starting(FrameworkMethod method)" method is invoked.

      Would it be possible to adjust Aruillian to do injection before junit runs @Rule? Or is there another way to write piece of code that is fired before each test and is aware of test method?

       

      Currently I'm writing @Rule that starts contexts (like mock of ViewScopedContext) if test method is marked with appropriate annotations.