Wicket CDI 1.1 and Wicket Tester

2013-11-30 Thread martin.dilger
There are a couple of Posts but none that answers my Question.
How is a Unit Test for a Wicket CDI Application supposed to be written?
For the CDI Module itself there is CDIUnit from JGlue, but this does not
work 
for ApplicationTests as the Classes are not found and some are marked as
Package Private so that you cannot add them manually via @AdditionalClasses.
Is there a working example somewhere how to do that without using something
heavy like Arquillian?
Is this even possible?
Thanks for any hints.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-CDI-1-1-and-Wicket-Tester-tp4662717.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket CDI 1.1 and Wicket Tester

2013-11-30 Thread martin.dilger
I have a very simple testcase running, described here
http://www.effectivetrainings.de/blog/2013/11/30/wicket-und-cdi-1-1-auf-den-richtigen-kontext-kommt-es-an/.
But I´m pretty sure there must be an easier way.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-CDI-1-1-and-Wicket-Tester-tp4662717p4662718.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket CDI 1.1 and Wicket Tester

2013-11-30 Thread Martin Grigorov
Hi,

There is a new experimental module that provides CdiWicketTester -
https://github.com/apache/wicket/blob/wicket-6.x/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/CdiWicketTester.java
It's first release will be with Wicket 6.13.0

But as you can see CdiWicketTester is in src/test/ folder. Now is the time
to file a ticket and ask this file to be moved to src/java/, so you can use
it in your application as well ;-)


On Sat, Nov 30, 2013 at 5:23 PM, martin.dilger martin.dil...@googlemail.com
 wrote:

 I have a very simple testcase running, described here

 http://www.effectivetrainings.de/blog/2013/11/30/wicket-und-cdi-1-1-auf-den-richtigen-kontext-kommt-es-an/
 .
 But I´m pretty sure there must be an easier way.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-CDI-1-1-and-Wicket-Tester-tp4662717p4662718.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Running a TestNG test suite from a wicket page

2013-11-30 Thread Martin Grigorov
Hi,

Usually when running (WicketTester) tests people provide mock
implementations of the external services like MQ, DB, ...
It is much easier to return some mock data, either good data or broken, to
your application and verify that it behaves correctly in both situations.


On Fri, Nov 29, 2013 at 7:10 PM, Martin Dietze d...@fh-wedel.de wrote:

 As in my project a number of resources are only available within
 the running web application (e.g. message queues and DB access
 are provided by the Glassfish application server), I would like
 to run a TestNG suite from a wicket page, thus allowing me to
 test pieces of the code that depend on those (and other
 resources).

 I've taken a brief look at the TestNG command line interface,
 and it seems like doing what is being done in TestNG.main should
 more or less work. Rather ugly, but seemingly without
 alternative, I need to have TestNG in my webapp's CLASSPATH.
 The test classes I package into a JAR that I deploy with the
 webapp when I want to run the tests. Still I need to configure
 TestNG to load all tests from that JAR specifically, and I
 haven't yet figured out how to do this.

 Just thought that I might not be the first trying this, so if
 there's anyone out there who has some experience with it, I'd
 greatly appreciate some hint.

 Cheers,

 M'bert

 --
 --- / http://herbert.the-little-red-haired-girl.org /
 -
 =+=
 That's right, yelled Vroomfondel, we demand rigidly defined areas of
 doubt and uncertainty!  -- Douglas Adams

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org