Search in sources :

Example 1 with GetMbusEncryptionKeyStatusResponse

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

the class BundledGetMbusEncryptionKeyStatusSteps method theBundleResponseShouldContainAGetMbusEncryptionKeyStatusResponse.

@Then("^the bundle response should contain a get M-Bus encryption key status response$")
public void theBundleResponseShouldContainAGetMbusEncryptionKeyStatusResponse() throws Throwable {
    final Response response = this.getNextBundleResponse();
    assertThat(response instanceof GetMbusEncryptionKeyStatusResponse).as("Not a valid response").isTrue();
    assertThat(((GetMbusEncryptionKeyStatusResponse) response).getEncryptionKeyStatus()).as("Encryption Key Status should not be null.").isNotNull();
    assertThat(((GetMbusEncryptionKeyStatusResponse) response).getMbusDeviceIdentification()).as("M-Bus Device Identification should not be null.").isNotNull();
}
Also used : GetMbusEncryptionKeyStatusResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusResponse) Response(org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response) GetMbusEncryptionKeyStatusResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusResponse) Then(io.cucumber.java.en.Then)

Example 2 with GetMbusEncryptionKeyStatusResponse

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

the class GetMbusEncryptionKeyStatusResponseMappingTest method shouldConvertGetMbusEncryptionKeyStatusResponse.

@Test
public void shouldConvertGetMbusEncryptionKeyStatusResponse() {
    final GetMbusEncryptionKeyStatusResponseData source = this.makeResponse();
    final GetMbusEncryptionKeyStatusResponse result = this.mapper.map(source, GetMbusEncryptionKeyStatusResponse.class);
    assertThat(result).as(MAPPED_OBJECT_NULL_MESSAGE).isNotNull();
    assertThat(result.getMbusDeviceIdentification()).as(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getMbusDeviceIdentification());
    assertThat(result.getEncryptionKeyStatus().name()).as(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getEncryptionKeyStatus().name());
}
Also used : GetMbusEncryptionKeyStatusResponseData(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseData) GetMbusEncryptionKeyStatusResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusResponse) Test(org.junit.jupiter.api.Test)

Aggregations

GetMbusEncryptionKeyStatusResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetMbusEncryptionKeyStatusResponse)2 Then (io.cucumber.java.en.Then)1 Test (org.junit.jupiter.api.Test)1 Response (org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.Response)1 GetMbusEncryptionKeyStatusResponseData (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusResponseData)1