deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gpetra...@apache.org>
Subject Re: evaluation of Exclude onExpression
Date Thu, 16 Mar 2017 13:57:28 GMT
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 <stephen.more@gmail.com>:

> 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 ?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message