Skip to content

Commit

Permalink
enhanced the testbase with new util methods taken care of formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sudheerkethireddy committed Mar 24, 2017
1 parent 64c1f4a commit 20660c6
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3972,18 +3972,18 @@ public String getAssignmentSummary(Experiment experiment, String context, int ex

return response.jsonPath().prettify();
}

/**
* Sends a GET request to retrieve experiment using the analytics endpoint.
* The response must contain {@link HttpStatus#SC_OK}.
* Sends a GET request to retrieve experiment using the analytics endpoint. The response must contain
* {@link HttpStatus#SC_OK}.
* <p>
* Uses the experiment's experimentLabel.
*
* @param experiment the experiment
* @return the cumulative experiment counts
*/
public void getAnalyticsExperiment(Experiment experiment) {

}

/////////////////////
Expand Down Expand Up @@ -4650,20 +4650,20 @@ public boolean clearAssignmentsMetadataCache() {
assertReturnCode(response, HttpStatus.SC_OK);
return true;
}

/**
* This util method returns the timeZone offset with respect to UTC
* in HH:MM format
* @param timeZone - the timeZone whose offset we want to calculate with
* respect to UTC timeZone
* This util method returns the timeZone offset with respect to UTC in HH:MM format
*
* @param timeZone - the timeZone whose offset we want to calculate with respect to UTC timeZone
* @return the String representation of the offset in HH:MM format
*/
public String getTimeZoneOffSet(String timeZone) {
TimeZone tz = TimeZone.getTimeZone(timeZone);
int offsetInMills = tz.getOffset( new Date().getTime());
String offset = String.format("%02d:%02d", Math.abs(offsetInMills / 3600000), Math.abs((offsetInMills / 60000) % 60));
int offsetInMills = tz.getOffset(new Date().getTime());
String offset = String.format("%02d:%02d", Math.abs(offsetInMills / 3600000),
Math.abs((offsetInMills / 60000) % 60));
offset = (offsetInMills >= 0 ? "+" : "-") + offset;

return offset;
}
}

0 comments on commit 20660c6

Please sign in to comment.