I have a MyFaces CODI application that utilizes WindowScoped beans. (
Session per tab - so thankful for that. )
I have been able to create url links that navigate to jsf pages using a
servlet. (
> if the window-id doesn't exist already (= first/initial get-request), you
> can generate and use any random value.
> (in this case please also have a look at deltaspike.window-id.max_length -
> see JsfBaseConfig)
>
> regards,
> gerhard
>
>
>
> 2016-02-01 23:49 GM
he 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
; MyFaces, DeltaSpike and OpenWebBeans
>
>
>
> 2016-07-05 21:56 GMT+02:00 Stephen More <stephen.m...@gmail.com>:
>
> > I finally got to the bottom of the issue - but is it a bug or a feature ?
> >
> > My runtime beans file is: src/main/webapp/WEB-INF/beans.xml
i 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.m...@gmail.com>:
>
> > Here is a non-working example:
> > https://github.com/mores/maven-exampl
I have been using org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner
to test JSF backing beans and everything seems to be working well.
At this point I am struggling how to test a plain old servlet that uses
injection, are there any examples anywhere ?
Here is what I currently have:
> hi stephen,
>
> please file a jira-ticket for such an improvement.
>
> thx & regards,
> gerhard
>
>
>
> 2017-02-28 13:38 GMT+01:00 Stephen More <stephen.m...@gmail.com>:
>
> > The current - non working test code can be found here:
> > https:/
https://issues.apache.org/jira/browse/DELTASPIKE-1236 has been created to
track this.
On Tue, Feb 28, 2017 at 9:24 AM, Stephen More <stephen.m...@gmail.com>
wrote:
> Sure, I will file a jira ticket, now that I have confirmation that this is
> not supposed to work out of the box
> regards,
> gerhard
>
>
>
> 2017-02-28 15:34 GMT+01:00 Stephen More <stephen.m...@gmail.com>:
>
> > https://issues.apache.org/jira/browse/DELTASPIKE-1236 has been created
> to
> > track this.
> >
> > On Tue, Feb 28, 2017 at 9:24 AM, Stephen More &l
your choice as well as some scopes,...
> (the rest is up to the cdi-container you are using.)
>
> regards,
> gerhard
>
>
>
> 2017-03-16 21:14 GMT+01:00 Stephen More <stephen.m...@gmail.com>:
>
> > Here is some additional info:
> > weld: 2.4.2.Final
> &
rhard
>
> [1] http://deltaspike.apache.org/documentation/core.html#BeanProvider
>
>
>
> 2017-02-28 18:26 GMT+01:00 Stephen More <stephen.m...@gmail.com>:
>
> > Where can I find an example of using BeanProvider to test a servlet using
> > injection ?
> >
>
This marks the completion of this thread. My Sample test now works for a
Named bean AND servlet using Faces Messages.
Needed to leverage classes from package org.apache.myfaces.test.mock
Thanks for your help Gerhard.
On Mon, Mar 20, 2017 at 8:28 PM, Stephen More <stephen.m...@gmail.com>
ause of the use of mockito. We provide some
> mocking support OOTB, would that help?
>
> http://deltaspike.apache.org/documentation/test-control.
> html#MockFrameworks
>
> John
>
> On Tue, Feb 28, 2017 at 7:38 AM Stephen More <stephen.m...@gmail.com>
> wrote:
>
> &
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
(ContextBeanInstance.java:83)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
Should I file a bug report for this issue ?
On Thu, Mar 16, 2017 at 3:20 PM, Stephen More <stephen.m...@gmail.com>
wrote:
> I am running into a strange problem
>
&g
I made a fork of:
https://github.com/os890/javase-cdi-ds-project-template/tree/mock-demo
which can be found here:
https://github.com/mores/javase-cdi-ds-project-template/tree/mockingInterface
When I run this test I get:
injectionTest(org.os890.cdi.test.SimpleMockTest):
It seems this was a simple fix:
-BeanInterface applicationScopedBean = mock(BeanInterface.class);
+BeanInterface applicationScopedBean =
mock(ApplicationScopedBean.class);
On Thu, Apr 12, 2018 at 12:06 PM, Stephen More <stephen.m...@gmail.com>
wrote:
> I ma
My real problem turns out to be an issue with Injecting Mock Dependent
Beans
I made a fork of:
https://github.com/os890/javase-cdi-ds-project-template/tree/mock-demo
which can be found here:
https://github.com/mores/javase-cdi-ds-project-template/tree/mockingInterface
; http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaSpike and OpenWebBeans
>
>
>
> 2018-04-12 22:27 GMT+02:00 Stephen More <stephen.m...@gmai
I have a need to run some unit tests with @Alternative - mockedVersionA
and other tests with @Alternative - mockedVersionB
and other tests with @Alternative - mockedVersionC
It looks like Arquillian can handle this utilizing ShrinkWrap and
@Deployment
addAsManifestResource(
/apache/deltaspike/test/testcontrol/uc020/DefaultTestService.java
>
>
>
> http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaSpike and OpenWebBeans
>
> 2
test-
> control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc016
>
>
>
> http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaS
ted:<[result-a]> but
was:<[default-result]>
On Mon, Apr 16, 2018 at 8:22 AM, Stephen More <stephen.m...@gmail.com>
wrote:
> Usually I work on multiple tasks at a time, and I might not communicate as
> well as I should. I will try to be a little more verbose.
>
> Before I
;
> http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaSpike and OpenWebBeans
>
> 2018-04-15 21:02 GMT+02:00 Stephen More <stephen.m...@gmail
> http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaSpike and OpenWebBeans
>
>
>
> 2018-04-15 14:41 GMT+02:00 Stephen More <stephen.m..
t to have a reference
> for similar questions.
>
> regards,
> gerhard
>
>
>
> http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaSpike an
IMO this is not a deltaspike issue.
For security take a look at https://www.pac4j.org/
Usually you have 1 page that logs in all users - Authentication
Then you assign roles to that user - Authorization
To secure your page utilize isUserInRole(*"ADMIN");*
27 matches
Mail list logo