Search in sources :

Example 1 with Feeder

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);
}
Also used : Feeder(org.opensmartgridplatform.adapter.kafka.da.domain.entities.Feeder) Location(org.opensmartgridplatform.adapter.kafka.da.domain.entities.Location) Given(io.cucumber.java.en.Given)

Aggregations

Given (io.cucumber.java.en.Given)1 Feeder (org.opensmartgridplatform.adapter.kafka.da.domain.entities.Feeder)1 Location (org.opensmartgridplatform.adapter.kafka.da.domain.entities.Location)1