use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetPowerQualityProfileRequest in project open-smart-grid-platform by OSGP.
the class GetGetPowerQualityProfileRequestMappingTest method makeRequest.
private GetPowerQualityProfileRequest makeRequest() {
final GetPowerQualityProfileRequest result = new GetPowerQualityProfileRequest();
result.setProfileType("PRIVATE");
result.setBeginDate(this.toGregorianCalendar(BEGIN_DATE));
result.setEndDate(this.toGregorianCalendar(END_DATE));
result.setSelectedValues(new CaptureObjectDefinitions());
return result;
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetPowerQualityProfileRequest in project open-smart-grid-platform by OSGP.
the class GetGetPowerQualityProfileRequestMappingTest method shouldConvertGetPowerQualityProfileRequest.
@Test
public void shouldConvertGetPowerQualityProfileRequest() {
final GetPowerQualityProfileRequest source = this.makeRequest();
final GetPowerQualityProfileRequestData result = this.mapper.map(source, GetPowerQualityProfileRequestData.class);
assertThat(result).as(MAPPED_OBJECT_NULL_MESSAGE).isNotNull();
assertThat(result.getProfileType()).as(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getProfileType());
assertThat(this.toGregorianCalendar(new DateTime(result.getBeginDate()))).as(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getBeginDate());
assertThat(this.toGregorianCalendar(new DateTime(result.getEndDate()))).as(MAPPED_FIELD_VALUE_MESSAGE).isEqualTo(source.getEndDate());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetPowerQualityProfileRequest in project open-smart-grid-platform by OSGP.
the class BundledGetPowerQualityProfileDataSteps method theBundleRequestContainsAGetPowerQualityProfileRequestAction.
@Given("^the bundle request contains a get power quality profile request with parameters$")
public void theBundleRequestContainsAGetPowerQualityProfileRequestAction(final Map<String, String> parameters) throws Throwable {
final GetPowerQualityProfileRequest action = new GetPowerQualityProfileRequestBuilder().fromParameterMap(parameters).build();
this.addActionToBundleRequest(action);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.bundle.GetPowerQualityProfileRequest in project open-smart-grid-platform by OSGP.
the class GetPowerQualityProfileRequestBuilder method build.
public GetPowerQualityProfileRequest build() {
final GetPowerQualityProfileRequest request = new GetPowerQualityProfileRequest();
request.setProfileType(this.profileType);
request.setBeginDate(this.beginDate);
request.setEndDate(this.endDate);
request.setSelectedValues(this.selectedValues);
return request;
}
Aggregations