Skip to content

Commit

Permalink
Merge pull request eclipse-tractusx#494 from catenax-ng/feature/TRI-1…
Browse files Browse the repository at this point in the history
…570-filter-out-bpns

feat(impl):[TRI-1570] filter our bpns
  • Loading branch information
ds-ext-kmassalski authored Aug 25, 2023
2 parents f611209 + 37c93b6 commit e2c0e23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.tractusx.irs.component.Bpn;
import org.eclipse.tractusx.irs.component.Relationship;
import org.eclipse.tractusx.irs.component.Submodel;
Expand Down Expand Up @@ -64,7 +65,7 @@ public class ItemTreesAssembler {
tombstones.addAll(itemGraph.getTombstones());
shells.addAll(itemGraph.getShells());
submodels.addAll(itemGraph.getSubmodels());
bpns.addAll(itemGraph.getBpns());
bpns.addAll(itemGraph.getBpns().stream().filter(bpn -> StringUtils.isNotBlank(bpn.getManufacturerName())).toList());
});

log.info("Assembled item graph from {} partial graphs", numberOfPartialTrees);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void shouldStartJobAndRetrieveResult() {
assertThat(finishedJob.get().getShells()).isNotEmpty();
assertThat(finishedJob.get().getTombstones()).isEmpty();
assertThat(finishedJob.get().getSubmodels()).isEmpty();
assertThat(finishedJob.get().getBpns()).isNotEmpty();
assertThat(finishedJob.get().getBpns()).isEmpty();
assertThat(finishedJob.get().getJob()).isNotNull();
assertThat(finishedJob.get().getJob().getSummary()).isNotNull();
assertThat(finishedJob.get().getJob().getParameter()).isNotNull();
Expand Down

0 comments on commit e2c0e23

Please sign in to comment.