The other way to do would be to use some public field which would allow a more typed
approach and enforce the contract with the different actions:
@TCK(4)
| public class InitializeBeforeHandle
| {
| @JoinPoint(portletId = InitializeBeforeHandlePortlet.NAME)
| public PortletRenderTestAction tmp = new PortletRenderTestAction()
| {
| protected DriverResponse run(Portlet portlet, RenderRequest request,
RenderResponse response, PortletTestContext context) throws PortletException, IOException
| {
| Assert.assertTrue(InitializeBeforeHandlePortlet.init);
| return new EndTestResponse();
| }
| };
| }
it is a bit more cluttered but enforces the contract. I remind here that the goal is to
provide a way to break down a test spanning several classes (different portlets + servlet)
of a same test case into one single place in order to make the test easy to read/write and
share a common state.
Ideas are welcome.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098588#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...