use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsAsyncRequest 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();
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.adhoc.GetAssociationLnObjectsAsyncRequest in project open-smart-grid-platform by OSGP.
the class AssociationLnObjectsRequestFactory method fromScenarioContext.
public static GetAssociationLnObjectsAsyncRequest fromScenarioContext() {
final GetAssociationLnObjectsAsyncRequest asyncRequest = new GetAssociationLnObjectsAsyncRequest();
asyncRequest.setCorrelationUid(RequestFactoryHelper.getCorrelationUidFromScenarioContext());
asyncRequest.setDeviceIdentification(RequestFactoryHelper.getDeviceIdentificationFromScenarioContext());
return asyncRequest;
}
Aggregations