use of org.apache.cxf.javascript.JavascriptTestUtilities.CountDownNotifier in project cxf by apache.
the class GreeterClientTest method sayHiClosureCaller.
private Void sayHiClosureCaller(Context context) {
CountDownNotifier notifier = testUtilities.rhinoCallConvert("requestClosureTest", CountDownNotifier.class, testUtilities.javaToJS(getAddress()));
boolean notified = notifier.waitForJavascript(1000 * 15);
assertTrue(notified);
Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
assertNull(errorStatus);
String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
assertNull(errorText);
// this method returns a String inside of an object, since there's an @WebResponse
String responseObject = testUtilities.rhinoEvaluateConvert("globalResponseObject.getResponseType()", String.class);
assertEquals("Bonjour", responseObject);
responseObject = testUtilities.rhinoEvaluateConvert("globalSecondResponseObject.getResponseType()", String.class);
assertEquals("Bonjour", responseObject);
return null;
}
Aggregations