Hi
Thanks for the pointer... cannot see any difference though
I also tried to print the class path (to be sure)
using System.out.println(System.getProperty("java.class.path")); and also
trying to load the apache-deltaspike.properties file, using
...ClassLoader.getSystemResourceAsStream("META-INF/apache-deltaspike.properties");
and its on the classpath...
Can I debug it somehow? It's probably some easy error I cannot see at the
moment
Regards
LF
On Thu, May 4, 2017 at 9:44 AM, Gerhard Petracek <[email protected]
> wrote:
> hi lars-fredrik,
>
> please compare your usage e.g. with [1].
>
> regards,
> gerhard
>
> [1} https://github.com/os890/ee6-ds-demo/tree/master/src/test
>
>
>
> 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-05-04 8:54 GMT+02:00 Lars-Fredrik Smedberg <[email protected]>:
>
> > Hi
> >
> > I'm new to using Deltaspike Test Control (1.7.2) and trying to use
> Mockito
> > mocks as explained in
> >
> > http://deltaspike.apache.org/documentation/test-control.
> > html#MockFrameworks
> >
> > I my META-INF (which is on the classpath when running the tests) I have
> the
> > beans.xml and apache-deltaspike.properties that contains
> >
> > deltaspike.testcontrol.mock-support.allow_mocked_beans=true
> > deltaspike.testcontrol.mock-support.allow_mocked_producers=true
> >
> > When calling ...addMock(...) on the injected DynamicMockManager I get the
> > following error message
> >
> > java.lang.IllegalStateException: The support for mocked CDI-Beans is
> > disabled due to a reduced portability across different
> CDI-implementations.
> > Please set 'deltaspike.testcontrol.mock-support.allow_mocked_beans'
> and/or
> > 'deltaspike.testcontrol.mock-support.allow_mocked_producers' to 'true'
> (in
> > 'META-INF/apache-deltaspike.properties') on your test-classpath.
> >
> > Running tests using test control without mocks works fine...
> >
> > Can anyone see what I'm doing wrong or what I'm missing? Probably
> something
> > easy!!.... been using Weld JUnit Extensions and CDIUnit before but never
> > Test Control :(
> >
> > Regards
> > LF
> >
> > --
> > Med vänlig hälsning / Best regards
> >
> > Lars-Fredrik Smedberg
> >
> > STATEMENT OF CONFIDENTIALITY:
> > The information contained in this electronic message and any
> > attachments to this message are intended for the exclusive use of the
> > address(es) and may contain confidential or privileged information. If
> > you are not the intended recipient, please notify Lars-Fredrik Smedberg
> > immediately at [email protected], and destroy all copies of this
> > message and any attachments.
> >
>
--
Med vänlig hälsning / Best regards
Lars-Fredrik Smedberg
STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at [email protected], and destroy all copies of this
message and any attachments.