https://cwiki.apache.org/WICKET/type-safe-testing-in-wicket.html
=)
2012/9/5 Markward Schubert markward.schub...@gmail.com:
Hi folks!
I am sure this is a trivial question, but i am simply too dumb to figure
this out.
We have a DopDownChoice, which is prefilled by some modelvalue, given to
to protect my code
against fellows changing the equals behavior.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Question-about-unit-testing-tp4651766p4651768.html
Sent from the Users forum mailing list archive at Nabble.com
Thank you for reply,
yes! And I get then another exception :)
Cannot resolve ServletContextResource without ServletContext
Does andybody know how can I get/set the servletContext?
Dmitriy
On 8 February 2011 18:01, Igor Vaynberg igor.vaynb...@gmail.com wrote:
did you call context.refresh() ?
Hi,
Try this in your application's #init() method (before calling #refresh() on
ctx)
ctx.setServletContext(getServletContext());
Attila
2011/2/9 Dmitriy Neretin dmitriy.nere...@googlemail.com
Thank you for reply,
yes! And I get then another exception :)
Cannot resolve
Hi,
thank you! Now I know how to get the ServletContext :) But it didn't solve
the main problem. This time I got following exception:
IOException parsing XML document from ServletContext resource
[/WEB-INF/applicationContext.xml]; nested exception is
java.io.FileNotFoundException: Could not open
The problem is that your test is not actualy running in a servlet container,
only in a wicket mocked servlet context. To access webapp resources in the
test you have to specify in the second parameter of WicketTester constructor
where your web app's root is. Like this (in a maven project):
Thank you it finally works! :)
But what I still don't understand: the problem appeared after I inserted
following in the custom session constructor:
InjectorHolder.getInjector().inject(this);
And why it worked with only one WicketTester constructor parameter (new
MyApplication)? And after
Hi,
2011/2/9 Dmitriy Neretin dmitriy.nere...@googlemail.com
Thank you it finally works! :)
Great!
But what I still don't understand: the problem appeared after I inserted
following in the custom session constructor:
InjectorHolder.getInjector().inject(this);
And why it worked with
Hi,
my complete setUp looks like this:
@Before
public void setUp() {
MworldWicketApplication wicketWebApp = new MworldWicketApplication()
{
ApplicationContext ctx = new XmlWebApplicationContext();
@Override
public void init() {
did you call context.refresh() ? like the error message said?
-igor
On Tue, Feb 8, 2011 at 1:31 AM, Dmitriy Neretin
dmitriy.nere...@googlemail.com wrote:
Hi,
my complete setUp looks like this:
@Before
public void setUp() {
MworldWicketApplication wicketWebApp = new
Hello everybody,
After integration with spring I have following problem:
if I add following to my CustomSession:
InjectorHolder.getInjector().inject(this); (because I store some spring
beans in the custom session)
My WicketTester doesn't work anymore. I get this exception:
BeanFactory not
I guess the problem is on the ApplicationContext object. Debug its creation
and see if it has all your beans. You can use another implementation for
tests, ex: FileSystemXmlApplicationContext
On Mon, Feb 7, 2011 at 11:10 AM, Dmitriy Neretin
dmitriy.nere...@googlemail.com wrote:
Hello
Did you provide the application to the wicket tester?
WicketTester tester = new WicketTester(myapp);
Martijn
On Mon, Feb 7, 2011 at 2:10 PM, Dmitriy Neretin
dmitriy.nere...@googlemail.com wrote:
Hello everybody,
After integration with spring I have following problem:
if I add following to
Hi,
of course. The point is if I delete this:
InjectorHolder.getInjector().inject(this);
from my session class everything works fine :(
On 7 February 2011 15:27, Martijn Dashorst martijn.dasho...@gmail.comwrote:
Did you provide the application to the wicket tester?
WicketTester tester =
make sure your setup() code runs before wicket tester instance is created.
-igor
On Mon, Feb 7, 2011 at 7:41 AM, Dmitriy Neretin
dmitriy.nere...@googlemail.com wrote:
Hi,
of course. The point is if I delete this:
InjectorHolder.getInjector().inject(this);
from my session class everything
15 matches
Mail list logo