Re: Unit Test AjaxRequestTarget.appendJavascript

2012-11-30 Thread Martin Grigorov
You can use PowerMock to register a mock via WebApplication#newAjaxRequestTarget() On Fri, Nov 30, 2012 at 4:16 PM, Tom Norton tomwnorton.mailing.li...@gmail.com wrote: Is it possible to test that appendJavascript is called on wicket 1.5? Thanks, Tom -- Martin Grigorov jWeekend

Re: Unit Test AjaxRequestTarget.appendJavascript

2012-11-30 Thread Tom Norton
to test that appendJavascript is called on wicket 1.5? Thanks, Tom -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/

Re: Unit Test AjaxRequestTarget.appendJavascript

2012-11-30 Thread Tom Norton
via WebApplication#newAjaxRequestTarget() On Fri, Nov 30, 2012 at 4:16 PM, Tom Norton tomwnorton.mailing.li...@gmail.com wrote: Is it possible to test that appendJavascript is called on wicket 1.5? Thanks, Tom -- Martin Grigorov jWeekend Training, Consulting, Development http

Re: Unit Test AjaxRequestTarget.appendJavascript

2012-11-30 Thread Martin Grigorov
tomwnorton.mailing.li...@gmail.com wrote: Is it possible to test that appendJavascript is called on wicket 1.5? Thanks, Tom -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Martin Grigorov jWeekend Training

Re: Unit Test AjaxRequestTarget.appendJavascript

2012-11-30 Thread Tom Norton
...@gmail.com wrote: Is it possible to test that appendJavascript is called on wicket 1.5? Thanks, Tom -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Martin Grigorov jWeekend Training

Re: Test project

2012-11-05 Thread Martin Grigorov
.nabble.com/Test-project-tp4653437p4653613.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: What is the way to test a behavior?

2012-11-03 Thread Per Newgro
Thanks, works like expected. You right. If i throw another exception (ex. IAE) the assertion on rendered page is working. So checking the last response status seems to be natural. Per - To unsubscribe, e-mail:

Re: What is the way to test a behavior?

2012-11-02 Thread Martin Grigorov
Hi, Additionally you need to : tester.executeBehavior() otherwise WicketTester is not used at all in your test. On Thu, Nov 1, 2012 at 10:49 PM, vineet semwal vineetsemwa...@gmail.com wrote: hi, this is expected behavior, AbortWithHttpErrorCodeException doesn't respond with InternalErrorPage

Re: What is the way to test a behavior?

2012-11-02 Thread vineet semwal
hi martin, you missed his test abortRenderingOnUsage() tester.executeBehavior() doesn't fit his case, also tester#executeBehavior(AbstractAjaxBehavior behavior) On Fri, Nov 2, 2012 at 1:49 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Additionally you need to : tester.executeBehavior

What is the way to test a behavior?

2012-11-01 Thread Per Newgro
Hi, i try to unit test a custom behavior. But i was wondering what's the right way to test it. I provide some code to explain my mind mismatch. The behavior shall interrupt the rendering of a component. I would like to answer this with a 404. Calling the behavior method directly results

Re: What is the way to test a behavior?

2012-11-01 Thread vineet semwal
(tester.getLastResponse().getErrorMessage(), This is for testing) ; On Thu, Nov 1, 2012 at 11:54 PM, Per Newgro per.new...@gmx.ch wrote: Hi, i try to unit test a custom behavior. But i was wondering what's the right way to test it. I provide some code to explain my mind mismatch. The behavior shall

Test project

2012-10-29 Thread Mats
/2si4vvbmxo4fqxg/TestUI.zip -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Test-project-tp4653437.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail

Re: Test project

2012-10-29 Thread Martin Grigorov
://apache-wicket.1842946.n4.nabble.com/Test-project-tp4653437.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

Re: Wicket page test

2012-10-23 Thread James mCruncher
we are using wicket 1.5.7. We have a simple test for each wicket page to assert rendering like this: WicketTester.assertRenderedPage(Page.class); In our module we have 52 tests w.r.t wicket pages. It takes so long to run these tests. Please give suggestion

Re: Wicket page test

2012-10-23 Thread Martin Grigorov
tests ? On Mon, Oct 22, 2012 at 9:10 AM, Arunachalam Sibisakkaravarthi arunacha...@mcruncher.com wrote: Hai, Here we are using wicket 1.5.7. We have a simple test for each wicket page to assert rendering like this: WicketTester.assertRenderedPage(Page.class

Re: Wicket page test

2012-10-23 Thread James Selvakumar
...@mcruncher.com wrote: Hai, Here we are using wicket 1.5.7. We have a simple test for each wicket page to assert rendering like this: WicketTester.assertRenderedPage(Page.class); In our module we have 52 tests w.r.t wicket pages. It takes so long

Re: Wicket page test

2012-10-23 Thread Martin Grigorov
, Arunachalam Sibisakkaravarthi arunacha...@mcruncher.com wrote: Hai, Here we are using wicket 1.5.7. We have a simple test for each wicket page to assert rendering like this: WicketTester.assertRenderedPage(Page.class); In our module we have 52 tests w.r.t

Wicket page test

2012-10-22 Thread Arunachalam Sibisakkaravarthi
Hai, Here we are using wicket 1.5.7. We have a simple test for each wicket page to assert rendering like this: WicketTester.assertRenderedPage(Page.class); In our module we have 52 tests w.r.t wicket pages. It takes so long to run these tests. Please give suggestion to improve test

Re: Wicket page test

2012-10-22 Thread Martin Grigorov
Hi, Do you call wicketTester.destroy() at the end of your tests ? On Mon, Oct 22, 2012 at 9:10 AM, Arunachalam Sibisakkaravarthi arunacha...@mcruncher.com wrote: Hai, Here we are using wicket 1.5.7. We have a simple test for each wicket page to assert rendering like

Re: Wicket page test

2012-10-22 Thread Arunachalam Sibisakkaravarthi
...@mcruncher.com wrote: Hai, Here we are using wicket 1.5.7. We have a simple test for each wicket page to assert rendering like this: WicketTester.assertRenderedPage(Page.class); In our module we have 52 tests w.r.t wicket pages. It takes so long to run these tests. Please give

Re: Wicket page test

2012-10-22 Thread Martin Grigorov
wicketTester.destroy() at the end of your tests ? On Mon, Oct 22, 2012 at 9:10 AM, Arunachalam Sibisakkaravarthi arunacha...@mcruncher.com wrote: Hai, Here we are using wicket 1.5.7. We have a simple test for each wicket page to assert rendering like this: WicketTester.assertRenderedPage

manage page ids in performance test loop

2012-10-21 Thread tsv
now. And the question: does someone has an experience with managing this id in such tests ? Is there some way to get the page version dynamically from somewhere (previews page ?) or ignore it completely ? I can try calculating it somehow but it will be test structure dependent and for every test

Re: Re: Re: Re: Basic JUnit Test

2012-08-28 Thread JCoder
What exactly do you mean by 'quickstart' ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: Re: Re: Re: Basic JUnit Test

2012-08-28 Thread Martin Grigorov
A mini application that reproduces the problem. See http://wicket.apache.org/start/quickstart.html On Tue, Aug 28, 2012 at 8:21 AM, JCoder i...@jcoder.de wrote: What exactly do you mean by 'quickstart' ? - To unsubscribe,

Re: Re: Re: Re: Re: Basic JUnit Test

2012-08-28 Thread JCoder
What exactly do you mean by 'quickstart' ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: Re: Re: Basic JUnit Test

2012-08-20 Thread JCoder
Hi Vineet, thanks for the reply. The line tester.getServletRequest().setParameter(myParam, testParam); But now Im breaking my head with the next issue. If you look at my first post, Im trying to do a test where a second page is rendered after a submit on an AjaxButton. The test code looks like

Re: Re: Re: Basic JUnit Test

2012-08-20 Thread vineet semwal
that test looks ok to me ,please attach a quickstart On Mon, Aug 20, 2012 at 12:23 PM, JCoder i...@jcoder.de wrote: Hi Vineet, thanks for the reply. The line tester.getServletRequest().setParameter(myParam, testParam); But now Im breaking my head with the next issue. If you look at my first

Re: Re: Basic JUnit Test

2012-08-17 Thread JCoder
Hi Vineet, wickettester#ajaxEvent(button,onclick) is what I already tried. And it worked better but not finally finsihed. The cause of the next problem is that I need to provide some request parameter for this request since my application reads request and throws an exception if it can't find

Re: Re: Basic JUnit Test

2012-08-17 Thread vineet semwal
why are you attaching a new ajaxformsubmitbehavior to an ajaxbutton ,it already has it's own ? if you want to pass some request parameter ,you can set it to the request by tester.getRequest().setParameter(key,value) On Fri, Aug 17, 2012 at 12:09 PM, JCoder i...@jcoder.de wrote: Hi Vineet,

Re: Basic JUnit Test

2012-08-16 Thread JCoder
Well it turns out that reflective call of a method failes. I run into WicketRuntimeException in RequestListenerInterface.invoke(Page, Component). The button to submit is an instance of AjaxButton. Does this make a difference in initializing the test? Regards, Y

Re: Basic JUnit Test

2012-08-16 Thread JCoder
Furthermore, I found out that my test code calls public void onSubmit(); instead of calling the overridden protected void onSubmit(AjaxRequestTarget target, Form? form); These overriden methods reside in my anonymous inner subclass of AjaxButton

Re: Basic JUnit Test

2012-08-16 Thread vineet semwal
that is expected behavior try wickettester#ajaxEvent(button,onclick) or it's path equivalent On Thu, Aug 16, 2012 at 7:00 PM, JCoder i...@jcoder.de wrote: Furthermore, I found out that my test code calls public void onSubmit(); instead of calling the overridden protected void onSubmit

Re: Basic JUnit Test

2012-08-16 Thread vineet semwal
...@jcoder.de wrote: Furthermore, I found out that my test code calls public void onSubmit(); instead of calling the overridden protected void onSubmit(AjaxRequestTarget target, Form? form); These overriden methods reside in my anonymous inner subclass of AjaxButton

Basic JUnit Test

2012-08-13 Thread JCoder
Hi all, Im working at a basic Unit Test that looks like this: 1. tester.assertRenderedPage(FirstPage.class); 2. FormTester formTester = tester.newFormTester(myForm); 3. formTester.submit(myButton); 4. tester.assertRenderedPage(SecondPage.class); All lines work as expected. Only line 4 fails. I

Re: Basic JUnit Test

2012-08-13 Thread Martin Grigorov
Hi, Put a breakpoint in the button's onSubmit() method and see whether it is actually called. It could be that you need to call formTester.submit(myForm:myButton); On Mon, Aug 13, 2012 at 5:18 PM, JCoder i...@jcoder.de wrote: Hi all, Im working at a basic Unit Test that looks like this: 1

RE: Basic JUnit Test

2012-08-13 Thread Paul Bors
[mailto:mgrigo...@apache.org] Sent: Monday, August 13, 2012 11:53 AM To: users@wicket.apache.org Subject: Re: Basic JUnit Test Hi, Put a breakpoint in the button's onSubmit() method and see whether it is actually called. It could be that you need to call formTester.submit(myForm:myButton); On Mon, Aug 13

Re: Inputing string instead of a double value in junit test case throws NumberFormatException

2012-05-02 Thread Andrea Del Bene
At first sight I would say that your problem could be related to a different Locale used during unit test. You should compare the output of 'myData.getAmount()' when is called during testing and when is called running on Jetty server. I have a integration test case: FormTester

Elephas Blog Engine: how to setup a test repo

2012-04-30 Thread datazuul
flatfiles or just database? The last commits were 2008, so I am aware of it being not so wide spreaded. But I hope that some guys who worked on it are still around here... ;-) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Elephas-Blog-Engine-how-to-setup-a-test-repo

Re: Elephas Blog Engine: how to setup a test repo

2012-04-30 Thread meduolis
-how-to-setup-a-test-repo-tp4597689p4597714.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

Re: Elephas Blog Engine: how to setup a test repo

2012-04-30 Thread datazuul
message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Elephas-Blog-Engine-how-to-setup-a-test-repo-tp4597689p4597714.html To unsubscribe from Elephas Blog Engine: how to setup a test repo, click here

Feedback Panel exposes password in cleartext if minimumLength test fails

2012-02-15 Thread pblakez
Gidday when I add password field with minimumLength and the user enters an shorter password it is displayed in the feedback panel in cleartext is there a work around for this ? e.g. form.add(new PasswordTextField(pass).add(StringValidator.minimumLength(8)).setLabel(new ModelString(Password:)));

Re: Feedback Panel exposes password in cleartext if minimumLength test fails

2012-02-15 Thread Igor Vaynberg
override the validator message to not show the value... -igor On Wed, Feb 15, 2012 at 3:11 PM, pblakez pbla...@gmail.com wrote: Gidday when I add password field with minimumLength and the user enters an shorter password it is displayed in the feedback panel in cleartext is there a work

Re: Feedback Panel exposes password in cleartext if minimumLength test fails

2012-02-15 Thread pblakez
ok that works thanks igor cheers pb... On Thu, Feb 16, 2012 at 10:22 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: override the validator message to not show the value... -igor On Wed, Feb 15, 2012 at 3:11 PM, pblakez pbla...@gmail.com wrote: Gidday when I add password field with

Re: how to test the wicket panel

2012-02-13 Thread akiindia01
:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-test

Re: how to test the wicket panel

2012-02-13 Thread Alec Swan
in context: http://apache-wicket.1842946.n4.nabble.com/how-to-test-the-wicket-panel-tp4368407p4383536.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org

Re: Very simple Wicket test to verify panel type...

2012-02-10 Thread Bjørn Grønbæk
); wicketTester.assertComponent(:panelid,PanelA.class); but that doesn't work. The test fails with this message: junit.framework.AssertionFailedError: component 'CreatePage' is not type:PanelA Am I using the AssertComponent in a wrong way? How else can I perform a test like that? Could you point me to a good

Very simple Wicket test to verify panel type...

2012-02-09 Thread Bjørn Grønbæk
(CreatePage.class); wicketTester.assertRenderedPage(CreatePage.class); wicketTester.assertComponent(:panelid,PanelA.class); but that doesn't work. The test fails with this message: junit.framework.AssertionFailedError: component 'CreatePage' is not type:PanelA Am I using the AssertComponent

Re: Very simple Wicket test to verify panel type...

2012-02-09 Thread Hans Lesmeister
); wicketTester.assertComponent(:panelid,PanelA.class); but that doesn't work. The test fails with this message: junit.framework.AssertionFailedError: component 'CreatePage' is not type:PanelA Am I using the AssertComponent in a wrong way? How else can I perform a test like that? Could you point me to a good

Re: Very simple Wicket test to verify panel type...

2012-02-09 Thread Martin Grigorov
PanelA(id);        else            p = new PanelB(id);         add(p); I've tried something like this: wicketTester.startPage(CreatePage.class); wicketTester.assertRenderedPage(CreatePage.class); wicketTester.assertComponent(:panelid,PanelA.class); but that doesn't work. The test fails

how to test the wicket panel

2012-02-08 Thread akiindia01
/how-to-test-the-wicket-panel-tp4368407p4368407.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

Re: how to test the wicket panel

2012-02-08 Thread Martin Grigorov
for page please tell me how to access the paginationfirst button in the testpanel regards, aki -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-test-the-wicket-panel-tp4368407p4368407.html Sent from the Users forum mailing list archive at Nabble.com

Running unit test in parallel

2011-12-22 Thread Vervenko Pavel
Hi! We are using wicket-1.4.8. We have a lot of unit tests and it takes long time to run them. To reduce running time at multi-core systems we decided to run them parallel in multiple threads. I use this

Re: Running unit test in parallel

2011-12-22 Thread Martin Grigorov
Hi, Some people ran 1.5.x core tests in parallel with JUnit/Surefire parallel support and the problems they had were related with setting current Locale with Locale.setDefault(), i.e. JVM wide. Some tests expect specific i18n-ized results and due to changed Locale they failed. Improvements in

Re: Running unit test in parallel

2011-12-22 Thread Vervenko Pavel
I didn't mean that I want to run core tests. I need to run junits for wicket-based web applications in 3-4 parallel threads. We have a lot of tests based on WicketTester and it takes a lot of time to run them. Parallel running reduces execution time significantly. But as far as I can see it's

Re: Running unit test in parallel

2011-12-22 Thread Martin Grigorov
Wicket tests also use WicketTester :-) You can create simple application to experiment with. 2011/12/22 Vervenko Pavel willcode4f...@tut.by: I didn't mean that I want to run core tests. I need to run junits for wicket-based web applications in  3-4 parallel threads. We have a lot of tests

Re: How to test just a panel using apache wicket?

2011-11-27 Thread kamiseq
well im talking about 1.5.3, and it is not like you startPanel and it works, as it will try to call constructor with one parameter of the string type. If your panel has constructor with more than only id then you cant simply use it. so i guess this was a case where ITesterPanelSource was useful

Re: How to test just a panel using apache wicket?

2011-11-27 Thread vineet semwal
ues tester.startcomponentinpage(new myPanel(a,b)) On Sun, Nov 27, 2011 at 4:11 PM, kamiseq kami...@gmail.com wrote: well im talking about 1.5.3, and it is not like you startPanel and it works, as it will try to call constructor with one parameter of the string type. If your panel has

Re: How to test just a panel using apache wicket?

2011-11-27 Thread vineet semwal
sorry typo *use* :) 2011/11/27 vineet semwal vineetsemwal1...@gmail.com: ues tester.startcomponentinpage(new myPanel(a,b)) On Sun, Nov 27, 2011 at 4:11 PM, kamiseq kami...@gmail.com wrote: well im talking about 1.5.3, and it is not like you startPanel and it works, as it will try to call

Re: How to test just a panel using apache wicket?

2011-11-27 Thread kamiseq
ok I think I was blind yesterday ;] and I need to admit that javadoc is correct and says exactly the same thing (to use startComponentInPage(C component) thanks ;] pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __

Re: How to test just a panel using apache wicket?

2011-11-27 Thread vineet semwal
its not just your fault ,i think tester.startpanel should have been totally deprecated ie. all overloaded versions of startpanel On Sun, Nov 27, 2011 at 4:41 PM, kamiseq kami...@gmail.com wrote: ok I think I was blind yesterday ;] and I need to admit that javadoc is correct and says exactly the

Re: How to test just a panel using apache wicket?

2011-11-26 Thread kamiseq
for me this does not works either in 1.5.3 as inner test page has no markup pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __

Re: How to test just a panel using apache wicket?

2011-11-26 Thread kamiseq
the javadoc of ITesterPanelSource says Depreced since no longer needed in 1.5.3 can you give examples? pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __

Re: How to test just a panel using apache wicket?

2011-11-26 Thread Igor Vaynberg
tester.startpanel(panel)? -igor On Sat, Nov 26, 2011 at 3:57 PM, kamiseq kami...@gmail.com wrote: the javadoc of ITesterPanelSource says Depreced since no longer needed in 1.5.3 can you give examples? pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com

Re: How to test just a panel using apache wicket?

2011-11-26 Thread sudeivas
I just used tester.startPanel(new xxpanel(x,y)); It worked for me. Make sure that this panel has a .html file associated with it. Also make sure that you don't have any mock objects for the parent page or for this panel. Just keep the test case as simple as possible. Let me know if you still have

How to test just a panel using apache wicket?

2011-11-22 Thread sudeivas
Hello, In our project, we have some panels and we embed those panels dynamically to pages. public class DoublePanel extends Panel { public DoublePanel(String id, Panel leftPanel, Panel rightPanel) { . } } I am not sure how to write unit test just for this class without a webpage

Re: How to test just a panel using apache wicket?

2011-11-22 Thread sudeivas
Additional Information: Using Apache-Wicket - 1.5.3 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4097993.html Sent from the Users forum mailing list archive at Nabble.com

Re: How to test just a panel using apache wicket?

2011-11-22 Thread Igor Vaynberg
create a simple page that acts as a wrapper for the panel (as an inner class of the test perhaps) and use that to test -igor On Tue, Nov 22, 2011 at 4:11 PM, sudeivas sureshkumar@gmail.com wrote: Additional Information: Using Apache-Wicket - 1.5.3 -- View this message in context

Re: How to test just a panel using apache wicket?

2011-11-22 Thread sudeivas
, leftPanel, rightPanel)); } } @Before public void init() { tester = new WicketTester(); } @Test public void testDoublePanel() { tester.startPage(new TestPage()); } } But still I am getting the same exception, java.lang.NullPointerException

Re: How to test just a panel using apache wicket?

2011-11-22 Thread Igor Vaynberg
serialVersionUID = 1L;        public TestPage() {            super();            add(new DoublePanel(double, leftPanel, rightPanel));        }    }    @Before    public void init() {        tester = new WicketTester();    }    @Test    public void testDoublePanel

upgrade from version 1.4.17 to 1.4.18 : a test broken

2011-09-07 Thread Mathilde Pellerin
Hi all, when I upgrade my application from wicket version 1.4.17 to version 1.4.18, there is one test which fails. When I test application manually, there is no problem, so I think there is a problem inside the test. this is the test which failed with 1.4.18 : @Test public void

Re: wicket include in test

2011-08-25 Thread Igor Vaynberg
with setters on mockservletrequest and looking at the source of Include component to see how it uses them. if you cannot get it to do what you want then this component may not work in the test environment. as the last resort you can toggle its visibility if its running in a testcase. -igor On Wed

Re: wicket include in test

2011-08-25 Thread Alexander Gubin
Igor, thanks a lot! I was thinking of putting some check whether it's a test code into production code, but that idea seems a bit whacky :) Will play with MockServletRequest... thanks again Alexander On 08/25/2011 10:48 AM, Igor Vaynberg wrote: the include component tries to construct

wicket include in test

2011-08-24 Thread Alexander Gubin
I saw similar post about 2 years ago, but seems that the question was left unaswered. http://wicket-users.markmail.org/message/o6ub7gjxrheevlo4?q=test+include I have a page with Include, works fine, however when testing I get: org.apache.wicket.util.resource.ResourceStreamNotFoundException

Re: how to test what radio is checked in a radiogroup?

2011-08-22 Thread Mathilde Pellerin
test : TagTester tagFemme = tester.getTagByWicketId(formCreationQuestionnaire:genre:femme); TagTester tagHomme = tester.getTagByWicketId(formCreationQuestionnaire:genre:homme); TagTester tagMixte = tester.getTagByWicketId(formCreationQuestionnaire:genre:mixte

Re: how to test what radio is checked in a radiogroup?

2011-08-22 Thread Mike Mander
we can see that radio button with wicket:id=femme have tag checked. But in my test : TagTester tagFemme = tester.getTagByWicketId(formCreationQuestionnaire:genre:femme); TagTester tagHomme = tester.getTagByWicketId(formCreationQuestionnaire:genre:homme); TagTester

Re: how to test what radio is checked in a radiogroup?

2011-08-22 Thread Mike Mander
checked. But in my test : TagTester tagFemme = tester.getTagByWicketId(formCreationQuestionnaire:genre:femme); TagTester tagHomme = tester.getTagByWicketId(formCreationQuestionnaire:genre:homme); TagTester tagMixte = tester.getTagByWicketId(formCreationQuestionnaire:genre:mixte

Re: how to test what radio is checked in a radiogroup?

2011-08-22 Thread Kent Tong
In my unit test, I try to check what radio is selected, but I don't find how... You may check out http://wicketpagetest.sourceforge.net which will work for this use case. - To unsubscribe, e-mail: users-unsubscr

Re: how to test what radio is checked in a radiogroup?

2011-08-22 Thread Mathilde Pellerin
It works well when I don't provide the complete path ! Thank you a lot Mike !

Wicket 1.4.18: Performance of unit test observation.

2011-08-20 Thread cablepuff
(); } } It runs my test case within 2 seconds compare to 25 seconds for this below @Before public void setup() { this.authenticatedWebApp = new AuthenticatedTestApplication(); this.tester = new WicketTester(this.authenticatedWebApp); } @After public void

Re: Wicket 1.4.18: Performance of unit test observation.

2011-08-20 Thread Igor Vaynberg
() { if (this.tester != null) { this.tester.destroy(); } } It runs my test case within 2 seconds compare to 25 seconds for this below @Before public void setup() { this.authenticatedWebApp = new AuthenticatedTestApplication(); this.tester = new WicketTester(this.authenticatedWebApp); } @After public

Re: Wicket 1.4.18: Performance of unit test observation.

2011-08-20 Thread Bruno Borges
Not exactly... JUnit calls @Before and @After for each test method. That's why... *Bruno Borges* (21) 7672-7099 *www.brunoborges.com* On Sat, Aug 20, 2011 at 1:59 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: When you reuse the application instance across tests you are also reusing its

Re: Wicket 1.4.18: Performance of unit test observation.

2011-08-20 Thread Bruno Borges
Oh... sorry Igor... :-) *Bruno Borges* (21) 7672-7099 *www.brunoborges.com* On Sat, Aug 20, 2011 at 2:20 PM, Bruno Borges bruno.bor...@gmail.comwrote: Not exactly... JUnit calls @Before and @After for each test method. That's why... *Bruno Borges* (21) 7672-7099 *www.brunoborges.com

how to test what radio is checked in a radiogroup?

2011-08-19 Thread Mathilde Pellerin
, new ModelString(f))); genre.add(new RadioString(homme, new ModelString(h))); genre.add(new RadioString(mixte, new ModelString(b))); form.add(genre); This radiogroup match the genreDestinataire field in Questionnaire Entity (with a CompoundPropertyModel). In my unit test, I

Re: how to test what radio is checked in a radiogroup?

2011-08-19 Thread Mike Mander
Entity (with a CompoundPropertyModel). In my unit test, I try to check what radio is selected, but I don't find how... I can get Model Object from radioGroup like this : String genreObtenu = ((RadioGroupString)form.get(genreDestinataire)).getDefaultModelObjectAsString(); but it works even

Re: how to test what radio is checked in a radiogroup?

2011-08-19 Thread Mathilde Pellerin
(tagHomme.hasAttribute(checked)); Assert.assertFalse(tagMixte.hasAttribute(checked)); but my tagTester are always null ! I checked path many times, and I tried other way to instantiate tagTester, but without success. I already used TagTester in other test before without problem, and I really don't understand

Re: how to test what radio is checked in a radiogroup?

2011-08-19 Thread Mike Mander
test before without problem, and I really don't understand why it is always null here... Can you provide output from WicketTester.debugComponentTree()? Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org

Re: how to test what radio is checked in a radiogroup?

2011-08-19 Thread Mathilde Pellerin
I add WicketTester.debugComponentTrees() in my test juste before assertNotNull which failed like this : TagTester tagFemme = tester.getTagByWicketId(formCreationQuestionnaire:genre:femme); TagTester tagHomme = tester.getTagByWicketId(formCreationQuestionnaire:genre:homme

Re: how to test what radio is checked in a radiogroup?

2011-08-19 Thread Mike Mander
Am 19.08.2011 16:38, schrieb Mathilde Pellerin: I add WicketTester.debugComponentTrees() in my test juste before assertNotNull which failed like this : TagTester tagFemme = tester.getTagByWicketId(formCreationQuestionnaire:genre:femme); TagTester tagHomme

Re: how to test what radio is checked in a radiogroup?

2011-08-19 Thread Mathilde Pellerin
hum, yes and no... I mean, page is loaded by an ajax response (AjaxLink), but then there is no Ajax. This is the entire test, maybe it can help : @SuppressWarnings(unchecked) @Test @Transactional @Rollback public void testStory23_TA21_VerificationInitialisationBoutonsRadio

Re: how to test what radio is checked in a radiogroup?

2011-08-19 Thread Mike Müller
2011 18:38:43 +0200 Von: Mathilde Pellerin mathilde.pelle...@statlife.fr An: users@wicket.apache.org Betreff: Re: how to test what radio is checked in a radiogroup? hum, yes and no... I mean, page is loaded by an ajax response (AjaxLink), but then there is no Ajax. This is the entire test

Re: how to test what radio is checked in a radiogroup?

2011-08-19 Thread Shunmuga Raj
2011 18:38:43 +0200 Von: Mathilde Pellerin mathilde.pelle...@statlife.fr An: users@wicket.apache.org Betreff: Re: how to test what radio is checked in a radiogroup? hum, yes and no... I mean, page is loaded by an ajax response (AjaxLink), but then there is no Ajax. This is the entire

Re: how to test what radio is checked in a radiogroup?

2011-08-19 Thread Per Newgro
Welcome to wicket Shunmuga Did you check the website http://wicket.apache.org already. It's all there. Check the wiki, component examples and books section. Hope you have fun with wicket Cheers Per - To unsubscribe, e-mail:

how to setup guice in unit test

2011-06-22 Thread kamiseq
hej, I ve found something something like this http://blog.yanivkessler.com/2010/06/writing-unit-tests-for-guicey-wicket.htmlbut I think there should be some easier way to setup guice DI. I tried to use AtUnit but it doesnt work with webpages( I get *org.apache.wicket.WicketRuntimeException: There

Re: how to setup guice in unit test

2011-06-22 Thread Martin Grigorov
If you talk about wickettester test then I setup it the same way I do it for running in web container - thru IComponentInstantiationListener. I just pass different Giuce module which setups mock services. You can see it in www.jweekend.com/dev/LegUp guice quickstart. On Wed, Jun 22, 2011 at 3:28

Re: how to setup guice in unit test

2011-06-22 Thread kamiseq
ok, then I think I just took the wrong turn ;] I dont know why they bother themselves with custom testRunner pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __

problem to test form in modal window with wicket tester

2011-05-26 Thread Mathilde Pellerin
Hi all, I have a modal window with a login form inside that works fine when I test it manually. I try to test it with wicket tester since yesterday. I saw in some mails of this list that there is nothing special in testing modal windows. I tried this : tester.startPage(AccueilPage.class

Re: problem to test form in modal window with wicket tester

2011-05-26 Thread Andrea Del Bene
Hi Mathilde, maybe the form id you use in test is not correct. How do you add form to modalWindow? Can you attach code? Hi all, I have a modal window with a login form inside that works fine when I test it manually. I try to test it with wicket tester since yesterday. I saw in some mails

Re: problem to test form in modal window with wicket tester

2011-05-26 Thread Mathilde Pellerin
a null pointer when I try to get it with modalWindow.get(errorMsg); 2011/5/26 Andrea Del Bene adelb...@ciseonweb.it Hi Mathilde, maybe the form id you use in test is not correct. How do you add form to modalWindow? Can you attach code? Hi all, I have a modal window with a login

Re: problem to test form in modal window with wicket tester

2011-05-26 Thread Mathilde Pellerin
that form id is correct. It is the same problem with FeedBackPanel errorMsg : I get a null pointer when I try to get it with modalWindow.get(errorMsg); 2011/5/26 Andrea Del Bene adelb...@ciseonweb.it Hi Mathilde, maybe the form id you use in test is not correct. How do you add form

Re: problem to test form in modal window with wicket tester

2011-05-26 Thread Andrea Del Bene
Form id is corret, but remember that form and feedback panel are not added directly to modal window. They are inside ConnexionContentPanel which in turn is added to modalwindow. In your test you should be able to access form calling getContent() before get(loginForm), i.e

<    1   2   3   4   5   >