You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shale.apache.org by "Craig McClanahan (JIRA)" <ji...@apache.org> on 2006/08/21 19:56:31 UTC
[jira] Commented: (SHALE-260) New MockComponent class that extends
UIComponentBase
[ http://issues.apache.org/struts/browse/SHALE-260?page=comments#action_37993 ]
Craig McClanahan commented on SHALE-260:
----------------------------------------
+1 ... and we should add corresponding APIs for mocking value change events and listeners too.
> New MockComponent class that extends UIComponentBase
> ----------------------------------------------------
>
> Key: SHALE-260
> URL: http://issues.apache.org/struts/browse/SHALE-260
> Project: Shale
> Issue Type: New Feature
> Components: Test
> Affects Versions: 1.0.4-SNAPSHOT
> Reporter: sean schofield
> Assigned To: sean schofield
>
> I am in the process of writing a unit test for my backing bean. The bean has an actionListener which is supposed to log the user out of the session. As I was writing the unit test for this method I realized the existing mock objects to help do this were insufficient. Initially I thought I needed a mock ActionEvent but all I really need is a MockComponent class.
> Obviously one can provide their own mock implementation but given how common this usecase would seem to be, why not provide one? Initially I propose that we just implment the getFamily method but perhaps other methods would be appropriate as well. A MockActionEvent that uses a MockComponent might also be handy to have. Thoughts?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira