org.kuali.hr.time.util
Class TimeDetailTestUtils

java.lang.Object
  extended by org.kuali.hr.time.util.TimeDetailTestUtils

public class TimeDetailTestUtils
extends Object


Constructor Summary
TimeDetailTestUtils()
           
 
Method Summary
static TimeDetailActionFormBase buildDetailActionForm(TimesheetDocument timeshetDocument, Assignment assignment, EarnCode earnCode, org.joda.time.DateTime start, org.joda.time.DateTime end, BigDecimal amount, boolean acrossDays, String timeblockId, boolean spanningWeeks)
          From the provided set of parameters, build an action form suitable for submitting to the TimeDetailAction servlet.
static List<String> setTimeBlockFormDetails(com.gargoylesoftware.htmlunit.html.HtmlForm form, TimeDetailActionFormBase tdaf)
          Set the attributes on the provided html form to the values found in the provided ActionForm.
static com.gargoylesoftware.htmlunit.html.HtmlPage submitTimeDetails(com.gargoylesoftware.htmlunit.WebClient webClient, String principalId, String baseUrl, TimeDetailActionFormBase tdaf)
          A method to wrap the submission of the time details.
static com.gargoylesoftware.htmlunit.html.HtmlPage submitTimeDetails(com.gargoylesoftware.htmlunit.WebClient webClient, String baseUrl, TimeDetailActionFormBase tdaf)
          A method to wrap the submission of the time details.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeDetailTestUtils

public TimeDetailTestUtils()
Method Detail

buildDetailActionForm

public static TimeDetailActionFormBase buildDetailActionForm(TimesheetDocument timeshetDocument,
                                                             Assignment assignment,
                                                             EarnCode earnCode,
                                                             org.joda.time.DateTime start,
                                                             org.joda.time.DateTime end,
                                                             BigDecimal amount,
                                                             boolean acrossDays,
                                                             String timeblockId,
                                                             boolean spanningWeeks)
From the provided set of parameters, build an action form suitable for submitting to the TimeDetailAction servlet. In our case, we are mostly using it in a mock type of situation.

Parameters:
timeshetDocument -
assignment -
earnCode -
start -
end -
amount -
acrossDays -
timeblockId -
Returns:
A populated TimeDetailActionFormBase object.

setTimeBlockFormDetails

public static List<String> setTimeBlockFormDetails(com.gargoylesoftware.htmlunit.html.HtmlForm form,
                                                   TimeDetailActionFormBase tdaf)
Set the attributes on the provided html form to the values found in the provided ActionForm. Errors are returned in the List object.

Parameters:
form - The HtmlForm to populate.
tdaf - The ActionForm with values we will use to populate.
Returns:
A list of string error messages from the validation call.

submitTimeDetails

public static com.gargoylesoftware.htmlunit.html.HtmlPage submitTimeDetails(com.gargoylesoftware.htmlunit.WebClient webClient,
                                                                            String baseUrl,
                                                                            TimeDetailActionFormBase tdaf)
A method to wrap the submission of the time details.

Parameters:
baseUrl -
tdaf -
Returns:

submitTimeDetails

public static com.gargoylesoftware.htmlunit.html.HtmlPage submitTimeDetails(com.gargoylesoftware.htmlunit.WebClient webClient,
                                                                            String principalId,
                                                                            String baseUrl,
                                                                            TimeDetailActionFormBase tdaf)
A method to wrap the submission of the time details.

Parameters:
baseUrl -
tdaf -
Returns:


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