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();
}
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());
}
Aggregations