use of org.opensmartgridplatform.adapter.ws.schema.core.adhocmanagement.SetRebootAsyncRequest in project open-smart-grid-platform by OSGP.
the class SetRebootSteps method thenThePlatformBuffersASetRebootResponseMessage.
@Then("^the platform buffers a set reboot response message for device \"([^\"]*)\"$")
public void thenThePlatformBuffersASetRebootResponseMessage(final String deviceIdentification, final Map<String, String> expectedResult) {
final SetRebootAsyncRequest request = new SetRebootAsyncRequest();
final AsyncRequest asyncRequest = new AsyncRequest();
asyncRequest.setDeviceId(deviceIdentification);
asyncRequest.setCorrelationUid((String) ScenarioContext.current().get(PlatformKeys.KEY_CORRELATION_UID));
request.setAsyncRequest(asyncRequest);
Wait.until(() -> {
SetRebootResponse response = null;
try {
response = this.client.getSetRebootResponse(request);
} catch (final Exception e) {
// do nothing
}
assertThat(response).isNotNull();
assertThat(response.getResult()).isEqualTo(Enum.valueOf(OsgpResultType.class, expectedResult.get(PlatformKeys.KEY_RESULT)));
});
}
Aggregations