@@ -0,0 +1,2293 @@
+package gov.nih.nci.cabig.caaers.tools.spring.tabbedflow;%0A%0Aimport gov.nih.nci.cabig.caaers.AbstractTestCase;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0A%0Aimport junit.framework.TestCase;%0A%0Aimport org.springframework.mock.web.MockHttpServletRequest;%0Aimport org.springframework.validation.Errors;%0Aimport org.springframework.web.servlet.ModelAndView;%0A%0Apublic class ReflexiveAjaxableTabTest extends AbstractTestCase %7B%0A%0A%09private ReflexiveAjaxableTab reflexiveAjaxableTab;%0A%09private MockHttpServletRequest request;%0A%09%0A%09@Override%0A%09protected void setUp() throws Exception %7B%0A//%09%09reflexiveAjaxableTab = new ReflexiveAjaxableTab(%221%22, %222%22, %223%22, new Class%5B%5D%7BHttpServletRequest.class%7D) %7B%0A//%09%09reflexiveAjaxableTab = new ReflexiveAjaxableTab(%221%22, %222%22, %223%22) %7B%0A//%09%09%09public ModelAndView test(HttpServletRequest request, Object command, Errors errors)%7B%0A//%09%09%09%09ModelAndView mv = new ModelAndView(%22some_name%22);%0A//%09%09%09%09mv.getModel().put(%22ajax%22, %22test%22);%0A//%09%09%09%09return mv;%0A//%09%09%09%7D%0A//%09%09%7D;%0A%09%09reflexiveAjaxableTab = new TestReflexiveTab(%221%22, %222%22, %223%22);%0A%09%09request = new MockHttpServletRequest();%0A%09%7D%0A%09%0A%09public void testPostProcessAsynchronous() throws Exception%7B%0A%09%09request.addParameter(%22_asyncMethodName%22, %22test%22);%0A%09%09ModelAndView mv = reflexiveAjaxableTab.postProcessAsynchronous(request, new Object(), registerMockFor(Errors.class));%0A%09%09assertEquals(%22test%22, mv.getModel().get(%22ajax%22));%0A%09%7D%0A%0A%09public void testGetAJAXMethodInvAttrName() %7B%0A%09%09assertEquals(%22_asyncMethodName%22, reflexiveAjaxableTab.getAJAXMethodInvAttrName());%0A%09%7D%0A%0A%09public void testGetMethodName() %7B%0A%09%09request.addParameter(%22_asyncMethodName%22, %22test%22);%0A%09%09assertEquals(%22test%22, reflexiveAjaxableTab.getMethodName(request));%0A%09%7D%0A%09%0A%09public void testMethodInvocationRequest() %7B%0A%09%09assertFalse(reflexiveAjaxableTab.methodInvocationRequest(request));%0A%09%09request.addParameter(%22_asyncMethodName%22, %22test%22);%0A%09%09assertTrue(reflexiveAjaxableTab.methodInvocationRequest(request));%0A%09%7D%0A%0A%09public class TestReflexiveTab extends ReflexiveAjaxableTab%7B%0A%09%09%0A%09%09public TestReflexiveTab(String longTitle, String shortTitle,%0A%09%09%09%09String viewName) %7B%0A%09%09%09super(longTitle, shortTitle, viewName);%0A%09%09%7D%0A%0A%09%09public ModelAndView test(HttpServletRequest request, Object command, Errors errors)%7B%0A%09%09%09ModelAndView mv = new ModelAndView(%22some_name%22);%0A%09%09%09mv.getModel().put(%22ajax%22, %22test%22);%0A%09%09%09return mv;%0A%09%09%7D%0A%09%7D%0A%09%0A%7D%0A

Test case improvement.