Esempio n. 1
0
 public String getAjaxResponseContent(final String stubType, final String propertyName)
     throws Exception {
   if (stubType.equals("request")) {
     return StringUtils.determineObjectStringValue(
         ReflectionUtils.getPropertyValue(request, propertyName));
   } else if (stubType.equals("response")) {
     return StringUtils.determineObjectStringValue(
         ReflectionUtils.getPropertyValue(getResponse(), propertyName));
   } else {
     return "Unknown stub type: " + stubType;
   }
 }
Esempio n. 2
0
 public String getAjaxResponseContent(final String propertyName, final int sequencedResponseId)
     throws Exception {
   final List<StubResponse> allResponses = getAllResponses();
   return StringUtils.determineObjectStringValue(
       ReflectionUtils.getPropertyValue(allResponses.get(sequencedResponseId), propertyName));
 }