Search in sources :

Example 1 with EventNotificationResponse

use of org.opensmartgridplatform.oslp.Oslp.EventNotificationResponse in project open-smart-grid-platform by OSGP.

the class OslpDeviceSteps method theOslpEventNotificationResponseContains.

@Then("^the \"([^\"]*)\" event notification response contains$")
public void theOslpEventNotificationResponseContains(final String protocol, final Map<String, String> expectedResponse) {
    final Message responseMessage = (Message) ScenarioContext.current().get(PlatformPubliclightingKeys.RESPONSE);
    final EventNotificationResponse response = responseMessage.getEventNotificationResponse();
    assertThat(response.getStatus()).isEqualTo(getString(expectedResponse, PlatformPubliclightingKeys.KEY_STATUS));
}
Also used : Message(org.opensmartgridplatform.oslp.Oslp.Message) EventNotificationResponse(org.opensmartgridplatform.oslp.Oslp.EventNotificationResponse) Then(io.cucumber.java.en.Then)

Example 2 with EventNotificationResponse

use of org.opensmartgridplatform.oslp.Oslp.EventNotificationResponse in project open-smart-grid-platform by OSGP.

the class OslpDeviceSteps method theEventNotificationResponseContains.

/**
 * Verify that we have received an event notification response over OSLP/OSLP ELSTER
 */
@Then("^the event notification response contains$")
public void theEventNotificationResponseContains(final Map<String, String> expectedResponse) {
    final Message responseMessage = this.oslpMockServer.waitForResponse();
    final EventNotificationResponse response = responseMessage.getEventNotificationResponse();
    assertThat(response.getStatus().name()).isEqualTo(getString(expectedResponse, PlatformPubliclightingKeys.KEY_STATUS));
}
Also used : Message(org.opensmartgridplatform.oslp.Oslp.Message) EventNotificationResponse(org.opensmartgridplatform.oslp.Oslp.EventNotificationResponse) Then(io.cucumber.java.en.Then)

Aggregations

Then (io.cucumber.java.en.Then)2 EventNotificationResponse (org.opensmartgridplatform.oslp.Oslp.EventNotificationResponse)2 Message (org.opensmartgridplatform.oslp.Oslp.Message)2