/**
 * Created on April 18, 2005 Project: UI
 * 
 * @author DNS   RAMACP
 */
package gov.va.med.esr.ui.comms.action;

import servletunit.struts.CactusStrutsTestCase;

/**
 * Performs a unit test for a log on action
 */
public class CommsLogActionTest extends CactusStrutsTestCase {//MockStrutsTestCase {

   /**
    * Initializes the specific test case
    * @param name A test case name
    */
   public CommsLogActionTest(String name) {
      super(name);
   }

   public void setUp() throws Exception {
      super.setUp();
      setInitParameter("validating", "false");
      //setConfigFile("C:/projects/iteration_2/UI/config/test/WEB-INF/struts-config-comms.xml");
      setConfigFile("comms","/WEB-INF/comms/struts-config.xml");
      addRequestParameter("TestingUI", "true");
   }

   public void testCommsLogDisplay() {
    
      System.out.println("Testing testCommsLogDisplay");
      addRequestParameter("method", "display");
      setRequestPathInfo("/comms", "/commslog");
      actionPerform();
      verifyForward("success");
      //verifyForwardPath("/comms/commsLog.jsp");
      verifyTilesForward("success",".view.commsLog");

      verifyNoActionErrors();
   }
   
   public void testCommsLogDisplayElements() {
    
      System.out.println("Testing testCommsLogDisplayElements");
      addRequestParameter("method", "displayElementData");
      setRequestPathInfo("/comms", "/commslog");
      actionPerform();
      verifyForward("elements");
      //verifyForwardPath("/comms/elementDataContent.jsp");
      verifyTilesForward("elements",".view.elementData");
      verifyNoActionErrors();
   }
   
   public void tearDown () throws Exception {
	
		super.tearDown();
   }
}
   