Search in sources :

Example 1 with AssociationLnListElement

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

the class AssociationLnObjects method theObjectlistShouldBeReturned.

@Then("^the objectlist should be returned$")
public void theObjectlistShouldBeReturned(final Map<String, String> settings) throws Throwable {
    final GetAssociationLnObjectsAsyncRequest asyncRequest = AssociationLnObjectsRequestFactory.fromScenarioContext();
    final GetAssociationLnObjectsResponse response = this.responseClient.getResponse(asyncRequest);
    assertThat(response.getResult()).as("Response should be OK").isEqualTo(OsgpResultType.OK);
    assertThat(response.getAssociationLnList()).as("Response should contain an AssociationLnList").isNotNull();
    assertThat(response.getAssociationLnList().getAssociationLnListElement().get(0)).as("AssociationLnList shoudl have at least one entry").isNotNull();
    final AssociationLnListElement element = response.getAssociationLnList().getAssociationLnListElement().get(0);
    assertThat(element.getAccessRights()).as("AccessRights should be present").isNotNull();
    assertThat(element.getClassId()).as("ClassId should be present").isNotNull();
    assertThat(element.getLogicalName()).as("LogicalName should be present").isNotNull();
    assertThat(element.getVersion()).as("Version should be present").isNotNull();
    assertThat(element.getAccessRights().getAttributeAccess().getAttributeAccessItem().get(0).getAttributeId()).as("AttributeId should be present").isNotNull();
}
Also used : AssociationLnListElement(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.AssociationLnListElement) GetAssociationLnObjectsAsyncRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsAsyncRequest) GetAssociationLnObjectsResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsResponse) Then(io.cucumber.java.en.Then)

Aggregations

Then (io.cucumber.java.en.Then)1 AssociationLnListElement (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.AssociationLnListElement)1 GetAssociationLnObjectsAsyncRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsAsyncRequest)1 GetAssociationLnObjectsResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsResponse)1