[ http://issues.apache.org/struts/browse/SHALE-260?page=all ]
sean schofield updated SHALE-260:
---------------------------------
Summary: New MockComponent class that extends UIComponentBase (was:
New MockActionSource and MockActionEvent classes)
Description:
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?
was: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. What do people think about adding
these two new classes?
> 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