deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gpetra...@apache.org>
Subject Re: Adding DeltaSpike support to Jglue CDI-Unit
Date Tue, 05 Jul 2016 18:47:42 GMT
hi stephen,

ok - i thought it might be something different.
it works for me once i copy your classes to [1].
(+ replace CdiRunner with CdiTestRunner + drop the parts related to
CdiRunner.)

please follow the previous hints and check the required dependencies (see
e.g. [2]) to enable the jsf-support for junit-tests.

regards,
gerhard

[1] https://github.com/os890/javase-cdi-ds-project-template
[2]
https://github.com/CDIatWork/IdeaFork/blob/master/ideafork_ee6/pom.xml#L526



2016-07-05 19:57 GMT+02:00 Stephen More <stephen.more@gmail.com>:

> I did provide the link.
>
> Root project of maven examples: https://github.com/mores/maven-examples
> Directory that contains the example:
> https://github.com/mores/maven-examples/tree/master/prime-codi
>
> TestCase - org.jglue.cdiunit -
>
> https://github.com/mores/maven-examples/blob/master/prime-codi/src/test/java/org/test/TestMultiplication.java
> TestCase - org.apache.deltaspike.testcontrol -
>
> https://github.com/mores/maven-examples/blob/master/prime-codi/src/test/java/org/test/TestControl.java
>
>
> On Tue, Jul 5, 2016 at 1:41 PM, Gerhard Petracek <
> gerhard.petracek@gmail.com
> > wrote:
>
> > hi stephen,
> >
> > please provide a link to an example which illustrates the issue.
> >
> > regards,
> > gerhard
> >
> >
> >
> > 2016-07-05 17:29 GMT+02:00 Stephen More <stephen.more@gmail.com>:
> >
> > > Here is a non-working example:
> > > https://github.com/mores/maven-examples/tree/master/prime-codi
> > >
> > > TestMultiplication.java - uses org.jglue.cdiunit and works as expected
> > > TestControl.java - same test but uses testcontrol - error:
> > >
> > > Jul 05, 2016 11:24:35 AM
> > >
> > >
> >
> org.apache.deltaspike.testcontrol.api.junit.CdiTestSuiteRunner$LogRunListener
> > > testFailure
> > > INFO: [failed] org.test.TestControl#null message: Exception List with 3
> > > exceptions:
> > > Exception 0 :
> > > org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied
> > > dependencies for type Product with qualifiers @Default
> > >   at injection point [BackedAnnotatedField] @Inject
> > > org.test.TestMultiplication.product
> > >   at org.test.TestMultiplication.product(TestMultiplication.java:0)
> > >
> > >
> > > On Tue, Jul 5, 2016 at 10:55 AM, Stephen More <stephen.more@gmail.com>
> > > wrote:
> > >
> > > > I am now trying to do the same thing with
> > > > deltaspike-test-control-module-api, but I am receiving:
> > > >
> > > > org.jboss.weld.exceptions.DeploymentException: WELD-001408:
> Unsatisfied
> > > > dependencies for type Import with qualifiers @Default
> > > >   at injection point [BackedAnnotatedField] @Inject private
> > > org.Test.Import
> > > >   at org.Test.Import(Test.java:0)
> > > >
> > > > Is there a working example using deltaspike-test-control-module-api
> > > > somewhere ?
> > > >
> > > >
> > > > On Sat, Jun 25, 2016 at 4:59 PM, Ludovic Pénet <l.penet@senat.fr>
> > wrote:
> > > >
> > > >> I took a look at Jglue and did not understand what it does that
> > > >> deltaspike test control does not
> > > >>
> > > >> https://deltaspike.apache.org/documentation/test-control.html
> > > >>
> > > >> Can you please explain me ?
> > > >>
> > > >> With kind regards,
> > > >>
> > > >> Ludovic
> > > >>
> > > >>
> > > >> Le 25 juin 2016 21:41:37 GMT+02:00, Stephen More <
> > > stephen.more@gmail.com>
> > > >> a écrit :
> > > >>>
> > > >>> I found a tool that allows me to JUnit4 test my CDI JSF backing
> beans
> > > >>> http://jglue.org/cdi-unit/ !
> > > >>> Right now I know it supports javax.enterprise.context.SessionScoped
> > and
> > > >>> javax.faces.view.ViewScoped.
> > > >>> It does not currently support
> > > >>> org.apache.deltaspike.core.api.scope.WindowScoped :-(
> > > >>>
> > > >>> I opened up issue: https://github.com/BrynCooke/cdi-unit/issues/91
> > > >>>
> > > >>> Can anyone help with a pull request to get DeltaSpike support
into
> > > CDI-Unit
> > > >>> ?
> > > >>>
> > > >>> -Thanks
> > > >>> Stephen More
> > > >>>
> > > >>>
> > > >> --
> > > >> Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma
> > > >> brièveté.
> > > >>
> > > >
> > > >
> > >
> >
>

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