Skip to content

Commit 64cf50b

Browse files
authored
Add impacted Element Types to NetworkImpactsInfos (#68)
* feat(): impacted Element Types to NetworkImpactsInfos Signed-off-by: sBouzols <[email protected]>
1 parent 74f6481 commit 64cf50b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/org/gridsuite/study/notification/server/dto/NetworkImpactsInfos.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@
1717
public class NetworkImpactsInfos {
1818
private Set<String> impactedSubstationsIds;
1919
private Set<EquipmentDeletionInfos> deletedEquipments;
20+
private Set<String> impactedElementTypes;
2021
}

src/test/java/org/gridsuite/study/notification/server/NotificationWebSocketHandlerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private void withFilters(String filterStudyUuid, String filterUpdateType, boolea
174174
HEADER_PARENT_NODE, UUID.randomUUID().toString(), HEADER_REMOVE_CHILDREN, true),
175175

176176
Map.of(HEADER_STUDY_UUID, "", HEADER_UPDATE_TYPE, "indexation_status_updated", HEADER_INDEXATION_STATUS, "INDEXED"))
177-
.map(map -> new GenericMessage<>(new NetworkImpactsInfos(ImmutableSet.of(), ImmutableSet.of(new EquipmentDeletionInfos())), map))
177+
.map(map -> new GenericMessage<>(new NetworkImpactsInfos(ImmutableSet.of(), ImmutableSet.of(new EquipmentDeletionInfos()), ImmutableSet.of()), map))
178178
.collect(Collectors.toList());
179179

180180
@SuppressWarnings("unchecked")
@@ -400,7 +400,7 @@ public void testDiscard() {
400400
var sink = atomicRef.get();
401401
Map<String, Object> headers = Map.of(HEADER_STUDY_UUID, "foo", HEADER_UPDATE_TYPE, "oof");
402402

403-
sink.next(new GenericMessage<>(new NetworkImpactsInfos(ImmutableSet.of(), ImmutableSet.of(new EquipmentDeletionInfos())), headers)); // should be discarded, no client connected
403+
sink.next(new GenericMessage<>(new NetworkImpactsInfos(ImmutableSet.of(), ImmutableSet.of(new EquipmentDeletionInfos()), ImmutableSet.of()), headers)); // should be discarded, no client connected
404404

405405
notificationWebSocketHandler.handle(ws);
406406

@@ -411,7 +411,7 @@ public void testDiscard() {
411411
Disposable d1 = out1.map(WebSocketMessage::getPayloadAsText).subscribe(messages1::add);
412412
d1.dispose();
413413

414-
sink.next(new GenericMessage<>(new NetworkImpactsInfos(ImmutableSet.of(), ImmutableSet.of(new EquipmentDeletionInfos())), headers)); // should be discarded, first client disconnected
414+
sink.next(new GenericMessage<>(new NetworkImpactsInfos(ImmutableSet.of(), ImmutableSet.of(new EquipmentDeletionInfos()), ImmutableSet.of()), headers)); // should be discarded, first client disconnected
415415

416416
notificationWebSocketHandler.handle(ws);
417417

0 commit comments

Comments
 (0)