use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceLifecycleStatusByChannelRequest in project open-smart-grid-platform by OSGP.
the class SetDeviceLifecycleStatusByChannelRequestFactory method fromParameterMap.
public static SetDeviceLifecycleStatusByChannelRequest fromParameterMap(final Map<String, String> settings) {
final SetDeviceLifecycleStatusByChannelRequest request = new SetDeviceLifecycleStatusByChannelRequest();
final SetDeviceLifecycleStatusByChannelRequestData requestData = new SetDeviceLifecycleStatusByChannelRequestData();
request.setGatewayDeviceIdentification(settings.get(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION));
requestData.setChannel(Short.parseShort(settings.get(PlatformSmartmeteringKeys.KEY_CHANNEL)));
requestData.setDeviceLifecycleStatus(DeviceLifecycleStatus.valueOf(settings.get(PlatformSmartmeteringKeys.KEY_DEVICE_LIFECYCLE_STATUS)));
request.setSetDeviceLifecycleStatusByChannelRequestData(requestData);
return request;
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.management.SetDeviceLifecycleStatusByChannelRequest in project open-smart-grid-platform by OSGP.
the class SetDeviceLifecycleStatusByChannel method aSetDeviceLifecycleStatusByChannelRequestIsReceived.
@When("^a set device lifecycle status by channel request is received$")
public void aSetDeviceLifecycleStatusByChannelRequestIsReceived(final Map<String, String> settings) throws Throwable {
final SetDeviceLifecycleStatusByChannelRequest request = SetDeviceLifecycleStatusByChannelRequestFactory.fromParameterMap(settings);
final SetDeviceLifecycleStatusByChannelAsyncResponse asyncResponse = this.smManagementRequestClient.doRequest(request);
assertThat(asyncResponse).as("setDeviceCommunicationSettingsAsyncResponse should not be null").isNotNull();
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
}
Aggregations