|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.hr.time.test.TkTestUtils
public class TkTestUtils
Constructor Summary | |
---|---|
TkTestUtils()
|
Method Summary | |
---|---|
static com.gargoylesoftware.htmlunit.html.HtmlPage |
clickButton(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String name)
|
static com.gargoylesoftware.htmlunit.html.HtmlPage |
clickClockInOrOutButton(com.gargoylesoftware.htmlunit.html.HtmlPage page)
|
static com.gargoylesoftware.htmlunit.html.HtmlPage |
clickLunchInOrOutButton(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String lunchAction)
|
static Date |
createDate(int month,
int day,
int year,
int hours,
int minutes,
int seconds)
|
static TimeBlock |
createDummyTimeBlock(org.joda.time.DateTime clockIn,
org.joda.time.DateTime clockOut,
BigDecimal hours,
String earnCode)
|
static TimeBlock |
createDummyTimeBlock(org.joda.time.DateTime clockIn,
org.joda.time.DateTime clockOut,
BigDecimal hours,
String earnCode,
Long jobNumber,
Long workArea)
|
static void |
createEarnGroup(String earnGroup,
List<String> earnCodes,
Date asOfDate)
|
static TimeBlock |
createTimeBlock(TimesheetDocument timesheetDocument,
int dayInPeriod,
int numHours)
|
static TimeBlock |
createTimeBlock(TimesheetDocument timesheetDocument,
int dayInPeriod,
int numHours,
String earnCode)
|
static List<TimeBlock> |
createUniformActualTimeBlocks(TimesheetDocument timesheetDocument,
Assignment assignment,
String earnCode,
org.joda.time.DateTime start,
int days,
BigDecimal hours,
BigDecimal amount)
Helper method to generate time blocks suitable for db persistence in unit tests. |
static List<TimeBlock> |
createUniformTimeBlocks(org.joda.time.DateTime start,
int days,
BigDecimal hours,
String earnCode,
Long jobNumber,
Long workArea)
Helper method to create regular time blocks for use in testing. |
static List<TimeBlock> |
createUniformTimeBlocks(org.joda.time.DateTime start,
int days,
BigDecimal hours,
String earnCode,
Long jobNumber,
Long workArea,
Long task)
|
static com.gargoylesoftware.htmlunit.html.HtmlPage |
fillOutForm(com.gargoylesoftware.htmlunit.html.HtmlPage page,
Map<String,Object> criteria)
|
static Map<Timestamp,BigDecimal> |
getDateToHoursMap(TimeBlock timeBlock,
TimeHourDetail timeHourDetail)
|
static List<Job> |
getJobs(Date calDate)
|
static String |
getOnClickHref(com.gargoylesoftware.htmlunit.html.HtmlElement button)
Method to obtain the HREF onclick='' value from the button when the client side typically processes the request. |
static TimesheetDocument |
populateBlankTimesheetDocument(Date calDate)
|
static TimesheetDocument |
populateTimesheetDocument(Date calDate)
|
static void |
verifyAggregateHourSums(Map<String,BigDecimal> ecToHoursMap,
TkTimeBlockAggregate aggregate,
int flsaWeek)
|
static void |
verifyAggregateHourSums(String msg,
Map<String,BigDecimal> ecToHoursMap,
TkTimeBlockAggregate aggregate,
int flsaWeek)
Helper method to verify that the aggregate contains the correct sums as indicated in the ecToHoursMapping, on a SINGLE given flsaWeek. |
static void |
verifyAggregateHourSumsFlatList(String msg,
Map<String,BigDecimal> ecToHoursMap,
TkTimeBlockAggregate aggregate)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TkTestUtils()
Method Detail |
---|
public static TimesheetDocument populateBlankTimesheetDocument(Date calDate)
public static TimesheetDocument populateTimesheetDocument(Date calDate)
public static void createEarnGroup(String earnGroup, List<String> earnCodes, Date asOfDate)
public static List<TimeBlock> createUniformTimeBlocks(org.joda.time.DateTime start, int days, BigDecimal hours, String earnCode, Long jobNumber, Long workArea)
start
- days
- hours
- earnCode
- jobNumber
- workArea
-
public static List<TimeBlock> createUniformTimeBlocks(org.joda.time.DateTime start, int days, BigDecimal hours, String earnCode, Long jobNumber, Long workArea, Long task)
public static TimeBlock createDummyTimeBlock(org.joda.time.DateTime clockIn, org.joda.time.DateTime clockOut, BigDecimal hours, String earnCode)
public static TimeBlock createDummyTimeBlock(org.joda.time.DateTime clockIn, org.joda.time.DateTime clockOut, BigDecimal hours, String earnCode, Long jobNumber, Long workArea)
public static TimeBlock createTimeBlock(TimesheetDocument timesheetDocument, int dayInPeriod, int numHours)
public static TimeBlock createTimeBlock(TimesheetDocument timesheetDocument, int dayInPeriod, int numHours, String earnCode)
public static List<Job> getJobs(Date calDate)
public static com.gargoylesoftware.htmlunit.html.HtmlPage fillOutForm(com.gargoylesoftware.htmlunit.html.HtmlPage page, Map<String,Object> criteria) throws Exception
page:
- current html pagecriteria:
- The key is the field name and the value is a string array which contains the field value and the field type which can be chosen from TkTestConstants
Exception
public static com.gargoylesoftware.htmlunit.html.HtmlPage clickButton(com.gargoylesoftware.htmlunit.html.HtmlPage page, String name) throws Exception
page:
- current html page //NOTE doesnt seem to work currently for js setting of form variablesname:
- the button name
Exception
public static com.gargoylesoftware.htmlunit.html.HtmlPage clickClockInOrOutButton(com.gargoylesoftware.htmlunit.html.HtmlPage page) throws Exception
Exception
public static com.gargoylesoftware.htmlunit.html.HtmlPage clickLunchInOrOutButton(com.gargoylesoftware.htmlunit.html.HtmlPage page, String lunchAction) throws Exception
Exception
public static void verifyAggregateHourSumsFlatList(String msg, Map<String,BigDecimal> ecToHoursMap, TkTimeBlockAggregate aggregate)
public static void verifyAggregateHourSums(String msg, Map<String,BigDecimal> ecToHoursMap, TkTimeBlockAggregate aggregate, int flsaWeek)
ecToHoursMap
- ex: { 'REG' => 40, 'OVT' => 10 }aggregate
- An aggregate object containing the time blocksflsaWeek
- 0 indexed start week (pulling from aggregate)public static void verifyAggregateHourSums(Map<String,BigDecimal> ecToHoursMap, TkTimeBlockAggregate aggregate, int flsaWeek)
public static List<TimeBlock> createUniformActualTimeBlocks(TimesheetDocument timesheetDocument, Assignment assignment, String earnCode, org.joda.time.DateTime start, int days, BigDecimal hours, BigDecimal amount)
public static Map<Timestamp,BigDecimal> getDateToHoursMap(TimeBlock timeBlock, TimeHourDetail timeHourDetail)
public static Date createDate(int month, int day, int year, int hours, int minutes, int seconds)
public static String getOnClickHref(com.gargoylesoftware.htmlunit.html.HtmlElement button)
button
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |