Search in sources :

Example 1 with SynchronizeTimeRequest

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeRequest in project open-smart-grid-platform by OSGP.

the class SynchronizeTime method receivingAGetSynchronizeTimeRequest.

@When("^receiving a get synchronize time request$")
public void receivingAGetSynchronizeTimeRequest(final Map<String, String> settings) throws Throwable {
    final SynchronizeTimeRequest request = SynchronizeTimeRequestFactory.fromParameterMap(settings);
    final SynchronizeTimeAsyncResponse asyncResponse = this.requestClient.doRequest(request);
    assertThat(asyncResponse).as("AsyncResponse should not be null").isNotNull();
    ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
}
Also used : SynchronizeTimeAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeAsyncResponse) SynchronizeTimeRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeRequest) When(io.cucumber.java.en.When)

Example 2 with SynchronizeTimeRequest

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeRequest in project open-smart-grid-platform by OSGP.

the class SynchronizeTimeRequestFactory method fromParameterMap.

public static SynchronizeTimeRequest fromParameterMap(final Map<String, String> parameters) {
    final SynchronizeTimeRequest synchronizeTimeRequest = new SynchronizeTimeRequest();
    synchronizeTimeRequest.setDeviceIdentification(getString(parameters, PlatformSmartmeteringKeys.DEVICE_IDENTIFICATION, PlatformSmartmeteringDefaults.DEVICE_IDENTIFICATION));
    synchronizeTimeRequest.setSynchronizeTimeRequestData(SynchronizeTimeRequestDataFactory.fromParameterMap(parameters));
    return synchronizeTimeRequest;
}
Also used : SynchronizeTimeRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeRequest)

Example 3 with SynchronizeTimeRequest

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeRequest in project open-smart-grid-platform by OSGP.

the class SynchronizeTimeRequestFactory method fromParameterMap.

public static SynchronizeTimeRequest fromParameterMap(final Map<String, String> parameters) {
    final SynchronizeTimeRequest request = new SynchronizeTimeRequest();
    request.setDeviceIdentification(parameters.get(PlatformSmartmeteringKeys.DEVICE_IDENTIFICATION));
    request.setSynchronizeTimeRequestData(SynchronizeTimeRequestDataFactory.fromParameterMap(parameters));
    return request;
}
Also used : SynchronizeTimeRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeRequest)

Aggregations

SynchronizeTimeRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeRequest)3 When (io.cucumber.java.en.When)1 SynchronizeTimeAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.SynchronizeTimeAsyncResponse)1