Per Newgro wrote:
but isn't this cheating? Hmm. I never saw the FeedbackMessageClearing.
I always assumed that my test has to simulate the browser behavior. So i used the request cycle. If you get an error prone page (with messages) the browser will not reset the messages simply, or? If i'm not completely wrong you will stay on the page if you get errors. So you have to assign valid values to form components and send the page again. Then the appropriate attributes (error messages and so on) have to be reseted by the framework. If you do it manually it isn't testing as expected or?
I don't think I'm cheating. I think it's some cheating causing the problem: it seems to be caused by the method

public void setAutomaticallyClearFeedbackMessages(boolean automaticallyClearFeedbackMessages)
   {
       // FIXME This method is a quick fix for a unit testing problem that
       // should not exist
this.automaticallyClearFeedbackMessages = automaticallyClearFeedbackMessages;
   }


in RequestCycle. I haven't examined the source in detail (yet), but I assume that is there so that the error messages are available in the tester for assertions, i.e. in a normal runtime the messages are cleared after the page is rendered but they are not cleared in testing.

Kind regards
Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to