Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-23 Thread Timo Rantalaiho
On Fri, 20 Jul 2007, Craig Lenzen wrote: > And how are you overriding the "goToPageB" method in the test? Using > WicketTester you never actually create an instance of PageB, that is you as > the developer. Like this, in 1.3 wicket.startPage(new ITestPageSource(){ public Page

Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-20 Thread Craig Lenzen
Tim, And how are you overriding the "goToPageB" method in the test? Using WicketTester you never actually create an instance of PageB, that is you as the developer. -Craig Timo Rantalaiho wrote: > > On Tue, 17 Jul 2007, Ingram Chen wrote: > >> We also suffer the same issues here. But due to

Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-20 Thread Craig Lenzen
I've come up with a possible solution to this issue or at least a start that can be discussed a bit more. My solution is to implement my own implementation of wicket's IPageFactory. This implementation is really just a wrapper around the default one since the default one is final. I then create

[Wicket-user] WicketTester & border

2007-07-19 Thread Thies Edeling
I have a page containing a border and a form: GreyRoundedBorder greyBorder = new GreyRoundedBorder("configFrame", new ResourceModel("admin.config.title")); Form configForm = new Form("configForm", new CompoundPropertyModel(dbConfig)); greyBorder.add(configForm); When I want to unit test the for

Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-19 Thread Timo Rantalaiho
On Tue, 17 Jul 2007, Ingram Chen wrote: > We also suffer the same issues here. But due to unmanaged nature of Wicket, > there is no chance to intercept construction of page B unless you build your > own factory for page. > > class Page A { > MyFactory myFactory ; > public Page A { >

Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-17 Thread Craig Lenzen
This concept might work ok if the link only goes to the same page every time it is clicked, but what if the link goes to a different page depending on presentation logic with in the page. I think you would be SOL in that case. -Craig Ingram Chen-2 wrote: > > We also suffer the same issues her

Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-17 Thread Craig Lenzen
I guess saying "I don't care about page B" is a little harsh. I care that when the link is clicked that the next page to be rendered is page B, what I don't care about is that page B was actually rendered. So I don't think mocking up the page is the proper solution. Instead I would want to mock

Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-17 Thread Craig Lenzen
The Spring injection is setup properly, for functional use and unit testing. The issue is, is that I should not have to worry about setting up page B dependencies when I'm testing page A. I should only have to worry about that dependency when it comes to actually testing page B. -Craig Jean-B

Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-17 Thread Jean-Baptiste Quenot
* Craig Lenzen: > I'm looking for some feedback as to an issue I'm having with the > WicketTester. To start I'd like to point out that I'm using > Spring and injecting my pages / components via the wicket spring > project's component injector. > > Here is the situation, I have page A that ha

Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-16 Thread Eelco Hillenius
> The problem here is that fact that I'm only testing page A, I don't care > about the functionality of page B nor which services it might call. So is > there a better way? Is there a way that you can mock the rendering of page > B? Has anyone else ran into this issue and or questioned it, or h

Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-16 Thread Eelco Hillenius
> But due to unmanaged nature of Wicket, there is no chance to intercept > construction of page B unless you build your own factory for page. Not entirely true as there is IComponentInstantiationListener. Eelco - This SF.ne

Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-16 Thread Ingram Chen
We also suffer the same issues here. But due to unmanaged nature of Wicket, there is no chance to intercept construction of page B unless you build your own factory for page. class Page A { MyFactory myFactory ; public Page A { add(new Link("toBPage") { setResponsePage(

[Wicket-user] WicketTester and mocking up next page rendered.

2007-07-16 Thread Craig Lenzen
I'm looking for some feedback as to an issue I'm having with the WicketTester. To start I'd like to point out that I'm using Spring and injecting my pages / components via the wicket spring project's component injector. Here is the situation, I have page A that has a link to page B. In the test

Re: [Wicket-user] WicketTester does not clean up resources very well

2007-07-16 Thread Maurice Marrink
Well, thats why i asked if maybe i was missing something :) Anyway an issue has been created https://issues.apache.org/jira/browse/WICKET-762 Maurice Oh btw like Martijn said there might be a legit reason to keep the session and stuff around after the processing thingy but i really think they sho

Re: [Wicket-user] WicketTester does not clean up resources very well

2007-07-16 Thread Martijn Dashorst
I thought that not all resources were cleaned up so that test cases can query the response and other things. The responsibility is on the tester to initiate a new fresh RequestCycle iiuc. That said, it may be that we don't provide enough hooks to perform the clean up. Martijn On 7/15/07, Maurice

Re: [Wicket-user] WicketTester does not clean up resources very well

2007-07-16 Thread Eelco Hillenius
On 7/15/07, Maurice Marrink <[EMAIL PROTECTED]> wrote: > I just noticed that running the following minimal junittest fails. > WicketTester mock=new WicketTester(); > mock.setupRequestAndResponse(); > mock.processRequestCycle(); > mock.destroy(); > assertNull(Session.get()); //actually should throw

Re: [Wicket-user] WicketTester does not clean up resources very well

2007-07-16 Thread severian
Mr Mean wrote: > > > I would expect the threadlocal Session to be gone after the request > had been processed but it is even available after the application has > been destroyed. > > That would further explain what I was posting about here: http://www.nabble.com/Wicket-1.3.0-beta2---OutOfMem

[Wicket-user] WicketTester does not clean up resources very well

2007-07-15 Thread Maurice Marrink
I just noticed that running the following minimal junittest fails. WicketTester mock=new WicketTester(); mock.setupRequestAndResponse(); mock.processRequestCycle(); mock.destroy(); assertNull(Session.get()); //actually should throw IllegalStateException but I would expect the threadlocal Sess

Re: [Wicket-user] WicketTester and Spring

2007-07-11 Thread Evan Chooly
Here it is warts and all: http://www.antwerkz.com/wp/?p=1026 On 7/11/07, Evan Chooly <[EMAIL PROTECTED]> wrote: yeah, I saw that which is great. The problem is still getting the environment set up so that spring, et. al, can find everything it needs to initialize the application context. I f

Re: [Wicket-user] WicketTester and Spring

2007-07-11 Thread Evan Chooly
yeah, I saw that which is great. The problem is still getting the environment set up so that spring, et. al, can find everything it needs to initialize the application context. I figured it out yesterday and am writing up a blog entry on it now. On 7/10/07, Ingram Chen <[EMAIL PROTECTED]> wrote

Re: [Wicket-user] WicketTester and Spring

2007-07-10 Thread Ingram Chen
for wicket 1.2, see http://cwiki.apache.org/WICKET/spring.html for reference (button) Wicket 1.3 can use actual WebApplication so it should be no problem. On 7/11/07, Evan Chooly <[EMAIL PROTECTED]> wrote: Does anyone have any documentation on using WicketTester with annotation based spring i

[Wicket-user] WicketTester and Spring

2007-07-10 Thread Evan Chooly
Does anyone have any documentation on using WicketTester with annotation based spring injection? I tried creating a WicketTester using my own Application rather then the DummyApplication that's used by default but spring complains with: java.lang.IllegalStateException: No WebApplicationContext f

Re: [Wicket-user] WicketTester class in Wicket 1.3

2007-06-14 Thread Frank Bille
What should it do? the same as?: assertRenderedPage(p.getClass); assertSame(p, tester.getLastRenderedPage()); Frank On 6/15/07, Sean Sullivan <[EMAIL PROTECTED]> wrote: I'm using the WicketTester class from Wicket 1.3 trunk. WicketTester provides these methods: public Page startPage(C

[Wicket-user] WicketTester class in Wicket 1.3

2007-06-14 Thread Sean Sullivan
I'm using the WicketTester class from Wicket 1.3 trunk. WicketTester provides these methods: public Page startPage(Class c) public Page startPage(Page p) public void assertRenderedPage(Class expectedRenderedPageClass) I was wondering if there should also be a method with this signature:

Re: [Wicket-user] wickettester failures

2007-06-06 Thread Ryan Sonnek
THANK YOU! I was pulling my hair out, and since this was my first time with the WicketTester, i was totally thinking it was my use of the wicket classes. Now i'm back to kicking ass! On 6/6/07, James McLaughlin <[EMAIL PROTECTED]> wrote: > Hi Ryan, > > This explains it: > http://www.jroller.com/

Re: [Wicket-user] wickettester failures

2007-06-06 Thread James McLaughlin
Hi Ryan, This explains it: http://www.jroller.com/page/gridhaus?entry=maven2_testing_madness File it under "Ways in which maven hates me..." :) If you put this stanza in your pom, your test will work: ... org.apache.maven.plugins maven-surefire-plugin

Re: [Wicket-user] wickettester failures

2007-06-06 Thread Ryan Sonnek
On 6/5/07, James McLaughlin <[EMAIL PROTECTED]> wrote: > Hi Ryan, > I don't think you can test it like that unless you have a default > constructor, and even then I don't think it will work (I'm a bit > spotty on this). What I have always done is this: > > tester.startPanel(new TestPanelSource () {

Re: [Wicket-user] wickettester failures

2007-06-06 Thread Ryan Sonnek
here is the output from maven (copied from bamboo logs): [INFO] Surefire report directory: /data/​home/​wicket/​var/​data/ bamboo/​xml-data/​build-dir/​ WICKETSCRIPTACULOUS-TRUNK/​target/ surefire-reports org.apache.maven.surefire.booter.SurefireExecutionException: Unable to instantiate POJO 'clas

Re: [Wicket-user] wickettester failures

2007-06-05 Thread Eelco Hillenius
What is the failure stack trace when you execute it in maven? Eelco On 6/5/07, Ryan Sonnek <[EMAIL PROTECTED]> wrote: > I could use a little help here. I'm trying to write a unit test for > my component in wicketstuff-scriptaculous. The test runs in eclipse > just fine, but running "mvn test" c

Re: [Wicket-user] wickettester failures

2007-06-05 Thread James McLaughlin
Hi Ryan, I don't think you can test it like that unless you have a default constructor, and even then I don't think it will work (I'm a bit spotty on this). What I have always done is this: tester.startPanel(new TestPanelSource () { Panel getTestPanel(final String panelId) { return

[Wicket-user] wickettester failures

2007-06-05 Thread Ryan Sonnek
I could use a little help here. I'm trying to write a unit test for my component in wicketstuff-scriptaculous. The test runs in eclipse just fine, but running "mvn test" causes a build failure. What is the correct way to test this? public class AjaxEditInPlaceLabelTest extends TestCase {

Re: [Wicket-user] WicketTester & Sessions (1.3.0-incubating-beta1)

2007-05-17 Thread severian
Yes, I raised JIRA bug WICKET-574. -- View this message in context: http://www.nabble.com/WicketTester---Sessions-%281.3.0-incubating-beta1%29-tf3759412.html#a10659833 Sent from the Wicket - User mailing list archive at Nabble.com. --

Re: [Wicket-user] WicketTester & Sessions (1.3.0-incubating-beta1)

2007-05-16 Thread craigdd
Did a JIRA bug get created for this? I'm having the same issue and want to document in my code the JIRA issue number. If a bug hasn't been created then I'd be happy to create it myself. Thanks Craig severian wrote: > > I've been having trouble using sessions with WicketTester, even after > l

Re: [Wicket-user] WicketTester & Sessions (1.3.0-incubating-beta1)

2007-05-15 Thread Igor Vaynberg
please fire a jira bug -igor On 5/15/07, severian <[EMAIL PROTECTED]> wrote: I've been having trouble using sessions with WicketTester, even after looking over the old messages on this list. I've been trying to implement something like the example in Gurumurthy's "Pro Wicket" book, where a L

[Wicket-user] WicketTester & Sessions (1.3.0-incubating-beta1)

2007-05-15 Thread severian
I've been having trouble using sessions with WicketTester, even after looking over the old messages on this list. I've been trying to implement something like the example in Gurumurthy's "Pro Wicket" book, where a Login page places a User object in the session, and other pages subsequently have a

Re: [Wicket-user] Wickettester and Validators

2007-05-12 Thread Igor Vaynberg
you have to build the message yourself then. page.getLocalizer().getString("RequiredValidator") or something like that -igor On 5/12/07, behlma <[EMAIL PROTECTED]> wrote: Anyone or is it the wrong approach? behlma wrote: > > Hi guys, > I'm just fiddling around with the FormTester. > > Say

Re: [Wicket-user] Wickettester and Validators

2007-05-12 Thread behlma
Anyone or is it the wrong approach? behlma wrote: > > Hi guys, > I'm just fiddling around with the FormTester. > > Say I have a RequiredValidator and StringLengthValidator on my textfields > in a form, with custom error messages specified in the page's .properties > file. > > How can I let

[Wicket-user] Wickettester and Validators

2007-05-11 Thread behlma
Hi guys, I'm just fiddling around with the FormTester. Say I have a RequiredValidator and StringLengthValidator on my textfields in a form, with custom error messages specified in the page's .properties file. How can I let wickettester retrieve those custom message, instead of hardcoding them i

Re: [Wicket-user] WicketTester problem

2007-04-22 Thread Vadim Tesis
please ignore. it looks like i forgot to include javaee.jar From: "Vadim Tesis" <[EMAIL PROTECTED]> Reply-To: wicket-user@lists.sourceforge.net To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] WicketTester problem Date: Sun, 22 Apr 2007 20:06:41 + Hi all, i&#

[Wicket-user] WicketTester problem

2007-04-22 Thread Vadim Tesis
Hi all, i'm trying to write a simple test to see if a page gets rendered. when i run the test i'm getting error: NoClassDefFoundError for GenericServlet (see below). it complains about the line where WicketTester gets instantiated. i tried to specify absolute path to the .war file in the Wic

Re: [Wicket-user] WicketTester Best Practices

2007-04-17 Thread Ingram Chen
well, while testing panel, one should prepend "panel" in wicket path like: tester.startPanel(MyPanel.class); tester.clickLink("panel:logout"); this is pain and ugly but current WicketTester only support full absolute path to refer certain component. On 4/18/07, craigdd <[EMAIL PROTECTED]> wrote

[Wicket-user] WicketTester Best Practices

2007-04-17 Thread craigdd
I'm looking for some input on what is the best practices for testing Panels that aren't inner classes to WebPage objects If I do the following; WicketTester tester = new WicketTester(); tester.startPanel(MyPanel.class); tester.clickLink("logout"); I get an exception saying path: 'logout' does

Re: [Wicket-user] WicketTester

2007-04-04 Thread Eelco Hillenius
Can you please create a JIRA issue for this? It seems to be a bug in the custom serialization code that is experimental in Wicket now. It would actually be great if we could switch to an in-memory session store when executing tests. Eelco On 4/4/07, Mats Norén <[EMAIL PROTECTED]> wrote: > Update

Re: [Wicket-user] WicketTester

2007-04-04 Thread Mats Norén
Update, I switched to the latest snapshot and got the same error On 4/4/07, Mats Norén <[EMAIL PROTECTED]> wrote: > I try to setup a simple testcase with a bookmarkablepage and get the > following exception about the serialization. > > INFO - Application- [WicketTester$1] in

Re: [Wicket-user] WicketTester

2007-04-04 Thread Mats Norén
I try to setup a simple testcase with a bookmarkablepage and get the following exception about the serialization. INFO - Application- [WicketTester$1] init: Wicket extensions initializer INFO - Application- [WicketTester$1] init: Wicket core library initializer IN

[Wicket-user] WicketTester

2007-04-04 Thread Mats Norén
Hi, Is there an example on how to test bookmarkable pages with pageparameters? Do I have to use the ITestPage and call the constructor page(PageParameters params)? /Mats - Take Surveys. Earn Cash. Influence the Future of IT J

Re: [Wicket-user] WicketTester message resolution

2007-03-08 Thread Juergen Donnerstag
You are using 1.2.x? To me it sounds like a bug that WicketTester or MockWebApplication does not look into the application properties file as a normal "Application" does. We should simply look at the config of normal application and copy the one line of config into WicketTester. Juergen On 3/7/07

Re: [Wicket-user] WicketTester message resolution

2007-03-07 Thread Jean-Baptiste Quenot
* Dmitry Kandalov: > > > Jean-Baptiste Quenot-3 wrote: > > > > Nice code snippet, would you mind opening an issue, and providing > > your sample code as attachment? > > Sure, https://issues.apache.org/jira/browse/WICKET-368 Thanks! > Could you please also take a look at > https://issues.apac

Re: [Wicket-user] WicketTester message resolution

2007-03-07 Thread Dmitry Kandalov
Jean-Baptiste Quenot-3 wrote: > > * Dmitry Kandalov: > >> To use application properties I extend WicketTester and have >> this in constructor: > > Hi Dmitry, > > Nice code snippet, would you mind opening an issue, and providing > your sample code as attachment? > Sure, https://issues.a

Re: [Wicket-user] WicketTester message resolution

2007-03-07 Thread Jean-Baptiste Quenot
* Dmitry Kandalov: > To use application properties I extend WicketTester and have > this in constructor: Hi Dmitry, Nice code snippet, would you mind opening an issue, and providing your sample code as attachment? Thanks in advance, -- Jean-Baptiste Quenot aka John Banana Qwerty h

Re: [Wicket-user] WicketTester message resolution

2007-03-07 Thread Filippo Diotalevi
On 3/7/07, Dmitry Kandalov <[EMAIL PROTECTED]> wrote: > To use application properties I extend WicketTester and have this in > constructor: > [CUT] Thanks Dmitry I'll give it a try -- Filippo Diotalevi http://www.diotalevi.com http://www.jugmilano.it

Re: [Wicket-user] WicketTester message resolution

2007-03-07 Thread Dmitry Kandalov
FilippoDiotalevi wrote: > > Hi, > my application is in the (usual, I think) situation where the messages > for the page (i.e.) ContactMePage are partly contained in the > ContactMePage.properties file, and partly in the global > MyWebApplication.properties file. > > In this situation, when I us

[Wicket-user] WicketTester message resolution

2007-03-07 Thread Filippo Diotalevi
Hi, my application is in the (usual, I think) situation where the messages for the page (i.e.) ContactMePage are partly contained in the ContactMePage.properties file, and partly in the global MyWebApplication.properties file. In this situation, when I use WicketTester to test the ContactMePage I

Re: [Wicket-user] WicketTester question

2007-03-04 Thread Filippo Diotalevi
On 3/4/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote: > So, you're using Wicket 1.2.5? Yes, Wicket 1.2.5 -- Filippo Diotalevi http://www.diotalevi.com http://www.jugmilano.it - Take Surveys. Earn Cash. Influence the Fu

Re: [Wicket-user] WicketTester question

2007-03-04 Thread Jean-Baptiste Quenot
So, you're using Wicket 1.2.5? I came across the same thing, and had to disable a unit test: See bugTestPageConstructor() in WicketTesterTest And like you it uses the startPage(Page) method. What is really strange is that the same code runs smoothly in Wicket 2. Help from the team would

Re: [Wicket-user] WicketTester question

2007-03-04 Thread Filippo Diotalevi
On 3/2/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > All the components are logged as 'not rendered', but all tests are > > passed and the application works. > > Is this the normal behaviour of tests? > > That doesn't look normal to me. Did you get any further insight? Yes, what I discovered

Re: [Wicket-user] WicketTester question

2007-03-02 Thread Eelco Hillenius
> All the components are logged as 'not rendered', but all tests are > passed and the application works. > Is this the normal behaviour of tests? That doesn't look normal to me. Did you get any further insight? Eelco - Take

[Wicket-user] WicketTester question

2007-02-27 Thread Filippo Diotalevi
Hi, I'm writing tests using WicketTester (with Wicket 1.2.5); a sample test is: public void testPageShouldHaveRequiredComponents() { WicketTester wt = new WicketTester(); wt.startPage(new SummaryPage(JobPostCreatorHelper.createJobPost()));

Re: [Wicket-user] WicketTester and DropDownChoice.onSelectionChanged()

2007-02-23 Thread Jean-Baptiste Quenot
* Johan Compagner: > something like this: > >setupRequestAndResponse(); >getServletRequest().setRequestToComponent(DDC); >processRequestCycle(); Since a few seconds in 1.3 you can also do directly: tester.executeListener(DDC); -- Jean-Baptiste Quenot aka John Banan

Re: [Wicket-user] WicketTester and DropDownChoice.onSelectionChanged()

2007-02-07 Thread Johan Compagner
something like this: setupRequestAndResponse(); getServletRequest().setRequestToComponent(DDC); processRequestCycle(); johan On 2/7/07, Dmitry Kandalov <[EMAIL PROTECTED]> wrote: Hi, I have a code like this formTester.select( PATH_TO_DDC, 2 ); formTeste

[Wicket-user] WicketTester and DropDownChoice.onSelectionChanged()

2007-02-07 Thread Dmitry Kandalov
Hi, I have a code like this formTester.select( PATH_TO_DDC, 2 ); formTester.submit(); And I want onSelectionChanged() event to be called on DropDownChoice. What is the best way to do it? Thanks in advance. -- View this message in context: http://www.nabble.com/WicketTester-and-

[Wicket-user] wickettester: PageExpiredErrorPage

2006-09-20 Thread Erik Brakkee
Hi, I am using WicketTester and have the following code for submitting a form:       public void testRegistrationEmptyForm() {         FormTester form = _tester.newFormTester("editPersonPanel:personForm");         form.submit();         _tester.assertRenderedPage(Registration.class);     } No

Re: [Wicket-user] WicketTester migrating from 1.1 to 1.2

2006-08-08 Thread David Hansen
This works perfectly. Thanks. - Dave On Aug 7, 2006, at 10:09 PM, Juergen Donnerstag wrote: > This is how WicketTestCase does it and it is used in hundreds of tests > > application = new WicketTester(null); > application.setHomePage(pageClass); > > //

Re: [Wicket-user] WicketTester migrating from 1.1 to 1.2

2006-08-08 Thread Johan Compagner
Why are you calling again render on the page?The page is already rendered by the call startPage()On 8/8/06, David Hansen < [EMAIL PROTECTED]> wrote:For the last little while, we've been doing just fine under 1.1 withthe following( for generation of email, the text of which is pulledfrom the respon

Re: [Wicket-user] WicketTester migrating from 1.1 to 1.2

2006-08-07 Thread Juergen Donnerstag
This is how WicketTestCase does it and it is used in hundreds of tests application = new WicketTester(null); application.setHomePage(pageClass); // Do the processing application.setupRequestAndResponse(); application.

[Wicket-user] WicketTester migrating from 1.1 to 1.2

2006-08-07 Thread David Hansen
For the last little while, we've been doing just fine under 1.1 with the following( for generation of email, the text of which is pulled from the response ): WicketTester tester = new WicketTester( ); StringResponse response = new StringResponse( );

Re: [Wicket-user] WicketTester in 1.2 causing "internal error cloning object" errors.

2006-06-23 Thread Ingram Chen
It is just a bug. Thanks a lot !On 6/23/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: Fixed now.EelcoOn 6/22/06, Juergen Donnerstag < [EMAIL PROTECTED]> wrote:> I guess it is a bug.>> Juergen>> On 6/22/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > ITestPageSource is not serializable. If it wa

Re: [Wicket-user] WicketTester in 1.2 causing "internal error cloning object" errors.

2006-06-22 Thread Eelco Hillenius
Fixed now. Eelco On 6/22/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote: > I guess it is a bug. > > Juergen > > On 6/22/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > ITestPageSource is not serializable. If it was, you wouldn't have this > > problem. I don't use that part of Wicket myself,

Re: [Wicket-user] WicketTester in 1.2 causing "internal error cloning object" errors.

2006-06-22 Thread Juergen Donnerstag
I guess it is a bug. Juergen On 6/22/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > ITestPageSource is not serializable. If it was, you wouldn't have this > problem. I don't use that part of Wicket myself, nor wrote it, so I'm > not sure if that interface not being serializable is intentional.

Re: [Wicket-user] WicketTester in 1.2 causing "internal error cloning object" errors.

2006-06-22 Thread Eelco Hillenius
ITestPageSource is not serializable. If it was, you wouldn't have this problem. I don't use that part of Wicket myself, nor wrote it, so I'm not sure if that interface not being serializable is intentional. Maybe Ingram Chen can comment on that? Eelco On 6/22/06, Gert Jan Verhoog <[EMAIL PROTECT

Re: [Wicket-user] WicketTester in 1.2 causing "internal error cloning object" errors.

2006-06-22 Thread Gert Jan Verhoog
Juergen Donnerstag wrote: > HTTP sessions and hence Wicket Pages get serialized and hence all it > components and variable must be serializable or transient. We enforced > that policy a little bit to make sure the error are detected earlier > and late when the application is deployed already. Just

Re: [Wicket-user] WicketTester in 1.2 causing "internal error cloning object" errors.

2006-06-21 Thread Juergen Donnerstag
HTTP sessions and hence Wicket Pages get serialized and hence all it components and variable must be serializable or transient. We enforced that policy a little bit to make sure the error are detected earlier and late when the application is deployed already. Just make sure your components and comp

[Wicket-user] WicketTester in 1.2 causing "internal error cloning object" errors.

2006-06-21 Thread Gert Jan Verhoog
Hi list, After upgrading to Wicket 1.2, wicket tests for my project don't work anymore. Testing a page that is initialized using a custom constructor causes a WicketRuntimeException: wicket.WicketRuntimeException: Internal error cloning object. Make sure all dependent objects implement Seriali

Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-08 Thread Johan Compagner
fixed it by creating a new cycle right before the page is created with newPage()On 6/8/06, Michael Day <[EMAIL PROTECTED] > wrote:I've tried that.  It doesn't fix the problem.  Also most tests inwicket core don't do that... Anyway, here is the code with that method: public class IndexedParamTest ex

Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-08 Thread Johan Compagner
ahh the problem is that your HomePage is not directly rendered because you mount the homepagethen this code is encountered:            BookmarkablePageRequestTarget homepageTarget = new BookmarkablePageRequestTarget(                     homePageClass, parameters);            IRequestCodingStrategy

Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-08 Thread Michael Day
I've tried that. It doesn't fix the problem. Also most tests in wicket core don't do that... Anyway, here is the code with that method: public class IndexedParamTest extends TestCase { public IndexedParamTest(String name) { super(name); } public void testPage() throws

Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-08 Thread Johan Compagner
you still need to create a request cycle:public WebRequestCycle createRequestCycle()right after you create the response/requests objects.jOn 6/8/06, Michael Day <[EMAIL PROTECTED]> wrote: I had created a bug report for it with a code sample, but I'll pasteanother sample here:public class IndexedPa

Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-07 Thread Michael Day
I had created a bug report for it with a code sample, but I'll paste another sample here: public class IndexedParamTest extends TestCase { public IndexedParamTest(String name) { super(name); } public void testPage() throws Exception { WicketTester app = new Wick

Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-07 Thread Juergen Donnerstag
gt; > Michiel Trimpe| Java Developer| TomTom | [EMAIL PROTECTED] | +31 > (0)6 41482341mobile > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Michael > Day > Sent: Tuesday, June 06, 2006 6:42 AM > To: wicket-user@lists.sou

Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-07 Thread Juergen Donnerstag
This thread has started with Michiel Trempe providing some pieces of code which don't work One piece was a subclass of Application which looked like public void init() { configure(DEVELOPMENT); } and that doesn't work. You need to call Application.init(). Your probl

Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-06 Thread Michiel Trimpe
(0)6 41482341mobile -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Day Sent: Tuesday, June 06, 2006 6:42 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] WicketTester broken on 1.2? Hrm? I'm not extending WicketTester -- I&#

Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-05 Thread Michael Day
Hrm? I'm not extending WicketTester -- I'm extending TestCase. It doesn't have an init() method. I tried adding app.configure ("development"), but it didn't fix the issue. On Jun 4, 2006, at 4:33 AM, Juergen Donnerstag wrote: > You need to change init to call the super implementation > >

Re: [Wicket-user] WicketTester broken on 1.2?

2006-06-05 Thread Juergen Donnerstag
You need to change init to call the super implementation public void init() { super.init(); configure(DEVELOPMENT); } Juergen On 5/31/06, Michael Day <[EMAIL PROTECTED]> wrote: > I just noticed this thread after posting a bug report: > > ht

Re: [Wicket-user] WicketTester broken on 1.2?

2006-05-30 Thread Michael Day
I just noticed this thread after posting a bug report: http://sourceforge.net/tracker/index.php? func=detail&aid=1497866&group_id=119783&atid=684975 I assume it is related since the exception is the same. Michael Day On May 30, 2006, at 1:46 PM, Eelco Hillenius wrote: Test case wicket.util

Re: [Wicket-user] WicketTester broken on 1.2?

2006-05-30 Thread Eelco Hillenius
Test case wicket.util.tester.WicketTesterTest#testPageConstructor has: MyMockApplication tester = new MyMockApplication(); Book mockBook = new Book("xxId", "xxName"); Page page = new ViewBook(mockBook); tester.startPage(page);

Re: [Wicket-user] WicketTester broken on 1.2?

2006-05-30 Thread Juergen Donnerstag
plenty of our unit tests are based on WicketTester and they are still working properly. The change is not with WicketTester but with RequestCycle and the point in time it is available. May I suggest you check out the unit tests (WicketTestCase). Juergen On 5/30/06, Eelco Hillenius <[EMAIL PROTEC

Re: [Wicket-user] WicketTester broken on 1.2?

2006-05-30 Thread Eelco Hillenius
MyMockApplication is WicketTester btw ( public class MyMockApplication extends WicketTester { /** * Constructor. */ public MyMockApplication() { } } ) On 5/30/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: Test case wicket.util.tester.WicketTeste

[Wicket-user] WicketTester broken on 1.2?

2006-05-30 Thread Michiel Trimpe
Hey everyone,   I just finished creating tests in rc2, but after upgrading to wicket 1.2-final the tests now fail.   AppTester.java public class AppTester extends WicketTester { public AppTester() {     super("/admin"); } public void init() {    

Re: [Wicket-user] WicketTester & .properties file

2006-05-23 Thread Bram Buitendijk
Ingram Chen schreef: You can alter locale in webSession, for example: wicketTester.getWicketSession().setLocale(new Locale("fa_IR")); Thanks, but that wasn't really what i was looking for. I've now subclassed my own WicketTester: MyWicketTester, and i can have my own MyWicketTester.properties

Re: [Wicket-user] WicketTester & .properties file

2006-05-22 Thread Ingram Chen
You can alter locale in webSession, for example:wicketTester.getWicketSession().setLocale(new Locale("fa_IR"));On 5/22/06, BramB < [EMAIL PROTECTED]> wrote: I'm using the getString(String key) method in a few Components, to accesslocalized Strings from the properties file.When testing the component

[Wicket-user] WicketTester & .properties file

2006-05-22 Thread BramB
I'm using the getString(String key) method in a few Components, to access localized Strings from the properties file. When testing the components with WicketTester, how do i point WicketTester to the properties file i want it to use? -- View this message in context: http://www.nabble.com/WicketTe

Re: [Wicket-user] WicketTester throws exception instead of failing

2006-04-22 Thread Juergen Donnerstag
Could you please open a bug and if possible attach a simple junit test case Juergen On 4/22/06, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote: > Hi, > The WicketTester.assertVisible(path) method should check to see if the > component with > the given path is visible or not, but instead it throws

[Wicket-user] WicketTester throws exception instead of failing

2006-04-22 Thread Iman Rahmatizadeh
Hi, The WicketTester.assertVisible(path) method should check to see if the component with the given path is visible or not, but instead it throws a NullPointerException whenever it should fail. The getComponentFromLastRenderedPage(path) method returns null if the component is invisible. Thi

Re: [Wicket-user] WicketTester and checkAccess redirections

2006-04-11 Thread Juergen Donnerstag
No, it is not expected. Would you please copy the unit test and send it to me. I make sure it'll work in 1.2 Juergen On 4/11/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using Wicket 1.1.1 and trying to get my first WicketTester to work with > the current app. I can't seem to g

[Wicket-user] WicketTester and checkAccess redirections

2006-04-10 Thread Gustavo Hexsel
Hi, I'm using Wicket 1.1.1 and trying to get my first WicketTester to work with the current app. I can't seem to get the redirectToInterceptPage(Page) method to actually redirect to the page. It works fine from Tomcat and Jetty, but the WicketTester seems to ignore the call (though I step

Re: [Wicket-user] WicketTester replaces Application class

2006-03-13 Thread Ingram Chen
yea... That's one of major drawback of WicketTester since it heavily relies on MockWebApplication. so I personnally avoid to use Application to manage resources.To test with Spring, wiki has an excellent integration and testing, see:    http://www.wicket-wiki.org.uk/wiki/index.php/SpringYou may got

[Wicket-user] WicketTester replaces Application class

2006-03-13 Thread Nick Heudecker
The problem with WicketTester is it replaces your Application subclass, so if you're using something like Spring, you no longer have access to Spring-managed beans.  Is there a convenient workaround for this?

Re: [Wicket-user] WicketTester broken (FormTester won't gather request parameters on page)

2006-02-18 Thread Ingram Chen
I think I got the problemfirst, the test I provided is wrong, the 2nd FormTester should instantiated withoutfill blank string on FormComponets, or it will overwrite all FormComponent's input.  // disable filling blank string for all FormComponents  FormTester formTesterContinue = tester.newFormT

Re: [Wicket-user] WicketTester broken (FormTester won't gather request parameters on page)

2006-02-18 Thread Juergen Donnerstag
It looks like a namespace issue. We recently started using a kind of namespace for various "resources" including url parameter. Reason: avoiding issues due to users using wicket "preserved" names. Juergen On 2/18/06, Ingram Chen <[EMAIL PROTECTED]> wrote: > I upgrade to latest CVS, but found beha

[Wicket-user] WicketTester broken (FormTester won't gather request parameters on page)

2006-02-18 Thread Ingram Chen
I upgrade to latest CVS, but found behavior of FormTester changed.below is small test case for wicket.util.tester.WicketTesterTest:public void testCreateBook_submit() throws Exception {    MyMockApplication tester = new MyMockApplication();    tester.startPage(CreateBook.class);    FormTester formT

  1   2   >