Search in sources :

Example 6 with GetSpecificAttributeValueRequest

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

the class FunctionalExceptionsSteps method whenTheGetSpecificAttributeValueRequestGeneratingAnErrorIsReceived.

@When("^the get specific attribute value request generating an error is received$")
public void whenTheGetSpecificAttributeValueRequestGeneratingAnErrorIsReceived(final Map<String, String> settings) throws Throwable {
    final GetSpecificAttributeValueRequest request = SpecificAttributeValueRequestFactory.fromParameterMap(settings);
    final GetSpecificAttributeValueAsyncResponse asyncResponse = this.getSpecificAttributeValueRequestClient.doRequest(request);
    ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
    final GetSpecificAttributeValueAsyncRequest asyncRequest = SpecificAttributeValueRequestFactory.fromScenarioContext();
    try {
        this.getSpecificAttributeValueResponseClient.getResponse(asyncRequest);
    } catch (final Exception exception) {
        ScenarioContext.current().put(PlatformKeys.RESPONSE, exception);
    }
}
Also used : GetSpecificAttributeValueAsyncRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetSpecificAttributeValueAsyncRequest) GetSpecificAttributeValueAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetSpecificAttributeValueAsyncResponse) GetSpecificAttributeValueRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetSpecificAttributeValueRequest) When(io.cucumber.java.en.When)

Aggregations

GetSpecificAttributeValueRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetSpecificAttributeValueRequest)6 GetSpecificAttributeValueAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetSpecificAttributeValueAsyncResponse)3 When (io.cucumber.java.en.When)2 GetSpecificAttributeValueAsyncRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetSpecificAttributeValueAsyncRequest)2 BigInteger (java.math.BigInteger)1 Test (org.junit.jupiter.api.Test)1 ObisCodeValues (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ObisCodeValues)1