Search in sources :

Example 1 with GetConfigurationObjectResponse

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

the class BundledGetConfigurationObjectSteps method theBundleResponseShouldContainAConfigurationObjectResponse.

@Then("^the bundle response should contain a get configuration object response$")
public void theBundleResponseShouldContainAConfigurationObjectResponse() throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof GetConfigurationObjectResponse).as("response should be a GetConfigurationResponse object").isTrue();
}
Also used : GetConfigurationObjectResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetConfigurationObjectResponse) Response(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response) GetConfigurationObjectResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetConfigurationObjectResponse) Then(io.cucumber.java.en.Then)

Example 2 with GetConfigurationObjectResponse

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

the class BundledGetConfigurationObjectSteps method theBundleResponseShouldContainAConfigurationObjectResponse.

@Then("^the bundle response should contain a get configuration object response with values$")
public void theBundleResponseShouldContainAConfigurationObjectResponse(final Map<String, String> values) throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof GetConfigurationObjectResponse).as("response should be a GetConfigurationResponse object").isTrue();
    final ConfigurationObject configurationObject = ((GetConfigurationObjectResponse) response).getConfigurationObject();
    assertThat(configurationObject.getGprsOperationMode().toString()).as("The gprs operation mode is not equal").isEqualTo(values.get("GprsOperationMode"));
    configurationObject.getConfigurationFlags().getConfigurationFlag().forEach(f -> this.testConfigurationFlag(f, values));
}
Also used : GetConfigurationObjectResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetConfigurationObjectResponse) Response(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response) ConfigurationObject(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationObject) GetConfigurationObjectResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetConfigurationObjectResponse) Then(io.cucumber.java.en.Then)

Aggregations

Then (io.cucumber.java.en.Then)2 GetConfigurationObjectResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetConfigurationObjectResponse)2 Response (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response)2 ConfigurationObject (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationObject)1