org.kuali.hr.lm.leaveCalendar
Class LeaveCalendarTestUtils

java.lang.Object
  extended by org.kuali.hr.lm.leaveCalendar.LeaveCalendarTestUtils

public class LeaveCalendarTestUtils
extends Object


Constructor Summary
LeaveCalendarTestUtils()
           
 
Method Summary
static LeaveCalendarWSForm buildLeaveCalendarForm(LeaveCalendarDocument leaveCalendarDocument, Assignment assignment, EarnCode earnCode, org.joda.time.DateTime start, org.joda.time.DateTime end, BigDecimal amount, boolean spanningWeeks)
          From the provided set of parameters, build an action form suitable for submitting to the TimeDetailAction servlet.
static LeaveCalendarWSForm buildLeaveCalendarFormForSubmission(LeaveCalendarDocument leaveCalendarDocument, LeaveSummary leaveSummary)
          Builds a simple "mock" leave calendar form primed for action "approveLeaveCalendar".
static void setTimeBlockFormDetails(com.gargoylesoftware.htmlunit.html.HtmlForm form, LeaveCalendarWSForm tdaf)
          Set the attributes on the provided html form to the values found in the provided ActionForm.
static com.gargoylesoftware.htmlunit.html.HtmlPage submitLeaveCalendar(com.gargoylesoftware.htmlunit.WebClient webClient, String baseUrl, LeaveCalendarWSForm tdaf)
          A method to wrap the submission of the time details.
static com.gargoylesoftware.htmlunit.html.HtmlPage submitLeaveCalendar2(com.gargoylesoftware.htmlunit.WebClient webClient, String baseUrl, LeaveCalendarWSForm 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

LeaveCalendarTestUtils

public LeaveCalendarTestUtils()
Method Detail

buildLeaveCalendarForm

public static LeaveCalendarWSForm buildLeaveCalendarForm(LeaveCalendarDocument leaveCalendarDocument,
                                                         Assignment assignment,
                                                         EarnCode earnCode,
                                                         org.joda.time.DateTime start,
                                                         org.joda.time.DateTime end,
                                                         BigDecimal amount,
                                                         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, the situation of leave block addition.

Parameters:
leaveCalendarDocument -
assignment -
earnCode -
start -
end -
amount -
Returns:
A populated TimeDetailActionFormBase object.

buildLeaveCalendarFormForSubmission

public static LeaveCalendarWSForm buildLeaveCalendarFormForSubmission(LeaveCalendarDocument leaveCalendarDocument,
                                                                      LeaveSummary leaveSummary)
Builds a simple "mock" leave calendar form primed for action "approveLeaveCalendar". Suitable for testing logic LeaveCalendarSubmitAction actions.

Parameters:
leaveCalendarDocument -
assignment -
earnCode -
start -
end -
amount -
Returns:
A populated TimeDetailActionFormBase object.

setTimeBlockFormDetails

public static void setTimeBlockFormDetails(com.gargoylesoftware.htmlunit.html.HtmlForm form,
                                           LeaveCalendarWSForm tdaf)
Set the attributes on the provided html form to the values found in the provided ActionForm. Returns void, not a List of errors.

Parameters:
form - The HtmlForm to populate.
tdaf - The ActionForm with values we will use to populate.

submitLeaveCalendar

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

Parameters:
baseUrl -
tdaf -
Returns:

submitLeaveCalendar2

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

Parameters:
baseUrl -
tdaf -
Returns:


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