org.kuali.hr.time.timesheet.web
Class TimesheetWebTestBase

java.lang.Object
  extended by org.kuali.rice.test.BaseRiceTestCase
      extended by org.kuali.rice.test.RiceTestCase
          extended by org.kuali.rice.test.RiceInternalSuiteDataTestCase
              extended by org.kuali.hr.test.KPMETestCase
                  extended by org.kuali.hr.time.timesheet.web.TimesheetWebTestBase
All Implemented Interfaces:
org.kuali.rice.test.MethodAware
Direct Known Subclasses:
DailyOvertimeWebIntegrationTest, DOTIntegrationConfluenceTests, RoleTimesheetWebIntegrationTest, TimesheetIntegrationTest, TimesheetWorkflowIntegrationTest

public class TimesheetWebTestBase
extends KPMETestCase


Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.hr.test.KPMETestCase
KPMETestCase.ClearCacheLifecycle
 
Field Summary
static String BASE_DETAIL_URL
           
static Date JAN_AS_OF_DATE
           
static String USER_PRINCIPAL_ID
           
 
Fields inherited from class org.kuali.rice.test.RiceTestCase
DEFAULT_TEST_HARNESS_SPRING_BEANS, failedSuiteTestName, perTestLifeCycles, SUITE_LIFE_CYCLES_FAILED, SUITE_LIFE_CYCLES_RAN, suiteLifeCycles
 
Fields inherited from class org.kuali.rice.test.BaseRiceTestCase
log, method
 
Constructor Summary
TimesheetWebTestBase()
           
 
Method Summary
static boolean checkJSONValues(org.json.simple.JSONObject json, List<Map<String,Object>> thdList, Map<String,Object> checkValues)
          Examines the JSON structure that is written to each output TimeDetails page.
static boolean checkJSONValues(String json, List<Map<String,Object>> thdList, Map<String,Object> checkValues)
           
static String getTimesheetDocumentUrl(String tdocId)
           
static com.gargoylesoftware.htmlunit.html.HtmlPage loginAndGetTimeDetailsHtmlPage(String principalId, String tdocId, boolean assertValid)
          Uses an ID hack to manipulate the current Test user Login.
 void setUp()
           
 void tearDown()
           
 
Methods inherited from class org.kuali.hr.test.KPMETestCase
futureEffectiveDateValidation, getModuleName, getPerTestLifecycles, getSuiteLifecycles, setFieldValue
 
Methods inherited from class org.kuali.rice.test.RiceInternalSuiteDataTestCase
getKIMDataLoadOrderFile, getKIMSqlFileBaseLocation, getKRADDefaultSuiteTestData, loadSuiteTestData
 
Methods inherited from class org.kuali.rice.test.RiceTestCase
configureLogging, dumpMemory, getBaseDir, getConfigLocations, getFullTestName, getLoadApplicationLifecycle, getModuleTestConfigLocation, getRiceMasterDefaultConfigFile, getTestHarnessConfig, getTestHarnessSpringBeansLocation, getTestHarnessSpringResourceLoader, getUserDir, loadPerTestData, logAfterRun, logBeforeRun, report, setBaseDirSystemProperty, setClearTables, setModuleName, setUpInternal, startLifecycles, startSuiteDataLoaderLifecycles, stopLifecycles
 
Methods inherited from class org.kuali.rice.test.BaseRiceTestCase
getName, getPerTestDataLoaderLifecycle, resetLogLevels, setLogLevel, setName, setTestMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAN_AS_OF_DATE

public static final Date JAN_AS_OF_DATE

USER_PRINCIPAL_ID

public static final String USER_PRINCIPAL_ID
See Also:
Constant Field Values

BASE_DETAIL_URL

public static String BASE_DETAIL_URL
Constructor Detail

TimesheetWebTestBase

public TimesheetWebTestBase()
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class KPMETestCase
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Overrides:
tearDown in class KPMETestCase
Throws:
Exception

getTimesheetDocumentUrl

public static String getTimesheetDocumentUrl(String tdocId)

loginAndGetTimeDetailsHtmlPage

public static com.gargoylesoftware.htmlunit.html.HtmlPage loginAndGetTimeDetailsHtmlPage(String principalId,
                                                                                         String tdocId,
                                                                                         boolean assertValid)
                                                                                  throws Exception
Uses an ID hack to manipulate the current Test user Login.

Throws:
Exception

checkJSONValues

public static boolean checkJSONValues(org.json.simple.JSONObject json,
                                      List<Map<String,Object>> thdList,
                                      Map<String,Object> checkValues)
Examines the JSON structure that is written to each output TimeDetails page.

Parameters:
json - The JSON Object to examine
thdList - The (optional) list of Time Hour Details values
checkValues - The list of values to check for in the JSON object
Returns:
true if the JSON object contains the required values, false otherwise.

checkJSONValues

public static boolean checkJSONValues(String json,
                                      List<Map<String,Object>> thdList,
                                      Map<String,Object> checkValues)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.