hi gary, exactly that issue was the reason for the flag and the reason why it's false per default.
regards, gerhard http://www.irian.at Your JavaEE powerhouse - JavaEE Consulting, Development and Courses in English and German Professional Support for Apache MyFaces, DeltaSpike and OpenWebBeans 2017-11-19 21:07 GMT+01:00 Gary Hodgson <[email protected]>: > Hi > > I have a question about using @Before in CdiTestRunner enabled unit tests. > > The following test fails when I set the config property > deltaspike.testcontrol.use_test_class_as_cdi_bean=true > > @RunWith(CdiTestRunner.class) > public class ATest { > > boolean a; > > @Before > public void setup() { > a = true; > } > > @Test > public void testA() { > assertTrue(a); > } > } > > > Is this expected behaviour because the test class is processed as a CDI > bean? Or is it a bug? > > Cheers, > Gary >
