use of org.opensmartgridplatform.adapter.kafka.da.domain.entities.Feeder in project open-smart-grid-platform by OSGP.
the class FeederSteps method givenAFeeder.
@Given("a feeder")
public void givenAFeeder(final Map<String, String> settings) {
final Feeder feeder = new Feeder();
final String substationIdentification = ReadSettingsHelper.getString(settings, PlatformDistributionAutomationKeys.SUBSTATION_IDENTIFICATION, PlatformDistributionAutomationDefaults.SUBSTATION_IDENTIFICATION);
final Location location = this.locationSteps.findLocation(substationIdentification);
feeder.setLocation(location);
feeder.setFeederNumber(ReadSettingsHelper.getInteger(settings, PlatformDistributionAutomationKeys.FEEDER_NUMBER, PlatformDistributionAutomationDefaults.FEEDER_NUMBER));
feeder.setFieldCode(ReadSettingsHelper.getString(settings, PlatformDistributionAutomationKeys.FEEDER_FIELD_CODE));
feeder.setName(ReadSettingsHelper.getString(settings, PlatformDistributionAutomationKeys.FEEDER_NAME, PlatformDistributionAutomationDefaults.FEEDER_NAME));
feeder.setAssetLabel(ReadSettingsHelper.getString(settings, PlatformDistributionAutomationKeys.FEEDER_ASSET_LABEL));
this.feederRepository.save(feeder);
}