hi stephen, the example-code can't work, because the container is started already at that point. a static-block should work...
with different test-classes (-> different static-blocks), it should be possible to test different constellations (if you haven't customized config-option: deltaspike.testcontrol.stop_container). regards, gerhard 2017-03-16 13:35 GMT+01:00 Stephen More <[email protected]>: > Here is the gist of what I was trying to do: > > @RunWith( CdiTestRunner.class ) > Test > { > @Before > init() > { > System.setProperty( "key", "value" ); > } > > @Test > testOne() > { > // testing @Exclude( onExpression = "key!=value" ) > } > } > > > > It seems this will not work. ( or should this work, am I missing a config > option somewhere ? ) Only properties set on command line or configuration > of maven-surefire-plugin will be evaluated during the boot up of the CDI > container. > Is there any way to test different combinations of @Exclude within the code > of the Test class ? >
