Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 75B1F200C39 for ; Thu, 16 Mar 2017 14:57:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 74951160B7A; Thu, 16 Mar 2017 13:57:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BDCF1160B78 for ; Thu, 16 Mar 2017 14:57:50 +0100 (CET) Received: (qmail 69281 invoked by uid 500); 16 Mar 2017 13:57:50 -0000 Mailing-List: contact users-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@deltaspike.apache.org Delivered-To: mailing list users@deltaspike.apache.org Received: (qmail 69270 invoked by uid 99); 16 Mar 2017 13:57:49 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Mar 2017 13:57:49 +0000 Received: from mail-it0-f51.google.com (mail-it0-f51.google.com [209.85.214.51]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 98E2A1A0193 for ; Thu, 16 Mar 2017 13:57:49 +0000 (UTC) Received: by mail-it0-f51.google.com with SMTP id m27so3879002iti.1 for ; Thu, 16 Mar 2017 06:57:49 -0700 (PDT) X-Gm-Message-State: AFeK/H0L+Gq/BIaGpCmQgoPJXOBO3GvuTlrdAQQmmfEUcl6Lfj79AUv7VwQ5g2OPDBkGTVlwJ6Ak4096YKi9Yg== X-Received: by 10.36.89.211 with SMTP id p202mr10485006itb.97.1489672668983; Thu, 16 Mar 2017 06:57:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.73.67 with HTTP; Thu, 16 Mar 2017 06:57:28 -0700 (PDT) In-Reply-To: References: From: Gerhard Petracek Date: Thu, 16 Mar 2017 14:57:28 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: evaluation of Exclude onExpression To: users@deltaspike.apache.org Content-Type: multipart/alternative; boundary=001a11440836447236054ad97235 archived-at: Thu, 16 Mar 2017 13:57:51 -0000 --001a11440836447236054ad97235 Content-Type: text/plain; charset=UTF-8 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 : > 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 ? > --001a11440836447236054ad97235--