Test check complete of distribution set (#859)

* fix the logic that marks distributionSet as complete
* DistributionSets without SoftwareModules shall not be marked as complete, when no Software Module is assigned

Signed-off-by: Ravindranath Sandeep (INST-IOT/ESW-Imb) <Sandeep.Ravindranath@bosch-si.com>

* test to verify that the distributionSet is complete or not
* change test description

Signed-off-by: Nazife Basbaz <nazife.basbaz@bosch-si.com>
This commit is contained in:
Nazife Basbaz
2019-07-01 11:28:24 +02:00
committed by Stefan Behl
parent effb1e24ad
commit 2e37f85c2f
2 changed files with 18 additions and 2 deletions

View File

@@ -210,8 +210,8 @@ public class JpaDistributionSetType extends AbstractJpaNamedEntity implements Di
@Override
public boolean checkComplete(final DistributionSet distributionSet) {
List<SoftwareModuleType> smTypes = distributionSet.getModules().stream().map(SoftwareModule::getType)
.collect(Collectors.toList());
final List<SoftwareModuleType> smTypes = distributionSet.getModules().stream().map(SoftwareModule::getType)
.distinct().collect(Collectors.toList());
if (smTypes.isEmpty()) {
return false;
}