Skip to content

Commit

Permalink
[graph-system] Fix AddModificationOnAggregateDefinitionCommandEventFa…
Browse files Browse the repository at this point in the history
…ctory fixtures
  • Loading branch information
clickout committed Jul 28, 2023
1 parent f057438 commit d687516
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ private List<AggregateDefinitionDTO> load(ScopeOptions scopeOptions) {
var foundEventFactory = aggregate.getCommand()
.stream()
.flatMap(command -> command.getEventFactory().stream())
.filter(eventFactory -> eventFactory.getId().equals(addModification.getEventFactoryId()))
.filter(
eventFactory -> eventFactory.getId().equals(
addModification.getEventFactoryId().split("/")[1]
)
)
.findFirst()
.get();

Expand Down Expand Up @@ -216,7 +220,9 @@ private boolean isModificationContainedInFoundAggregates(
}
return foundAggregate.get().getCommand().stream().anyMatch(
command -> command.getEventFactory().stream().anyMatch(
eventFactory -> eventFactory.getId().equals(addModification.getEventFactoryId())
eventFactory -> eventFactory.getId().equals(
addModification.getEventFactoryId().split("/")[1]
)
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"modificationPath": "baseDefinitionRef"
}
],
"eventFactoryId": "cd43acdb-0818-4ae2-8f52-a5d6b289c8a6",
"eventFactoryId": "AggregateDefinitionCommandEventFactory/cd43acdb-0818-4ae2-8f52-a5d6b289c8a6",
"id": "StructureDefinitionAggregate"
}

0 comments on commit d687516

Please sign in to comment.