Skip to content

Commit

Permalink
PI-1473 add enhancement ability for domain events
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-britton-moj committed Sep 20, 2023
1 parent 0b22b06 commit 4a36d35
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ sealed interface EnhancedEventType {

fun of(value: String): EnhancedEventType = types[value] ?: NoEnhancement(value)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class NotificationEnhancer(enhancements: List<Enhancement>) {
override val eventType = enhancedEventType
override fun enhance(notification: Notification<HmppsDomainEvent>) = notification
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ class ProbationCaseEngagementCreatedEnhancement(
)
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class DomainEventServiceTest {
notificationPublisher = notificationPublisher,
notificationEnhancer = notificationEnhancer
)
whenever(notificationEnhancer.enhance(any())).thenAnswer { it.getArgument(0) }
}

@Test
Expand Down

0 comments on commit 4a36d35

Please sign in to comment.