Skip to content

Commit

Permalink
går over til precondition-apiet
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsteinsland committed Nov 14, 2024
1 parent 3df033e commit f51f7d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ internal class HelsesjekkRiver(

init {
River(rapidsConnection).apply {
precondition { it.requireValue("@event_name", "spokelse_helsesjekk") }
validate {
it.demandValue("@event_name", "spokelse_helsesjekk")
it.requireKey("system_participating_services", "@opprettet")
it.interestedIn("ukedag")
}
}.register(this)
River(rapidsConnection).apply {
precondition {
it.requireValue("@event_name", "halv_time")
it.forbidValues("ukedag", listOf("SATURDAY", "SUNDAY"))
}
validate {
it.demandValue("@event_name", "halv_time")
it.requireKey("system_participating_services", "@opprettet")
it.rejectValues("ukedag", listOf("SATURDAY", "SUNDAY"))
}
}.register(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ internal class UtbetaltePerioderRiver(

init {
River(rapidsConnection).apply {
precondition { it.requireValue("@event_name", "utbetalte-perioder") }
validate {
it.demandValue("@event_name", "utbetalte-perioder")
it.requireKey("@id","personidentifikatorer", "fom", "tom", "oppløsning")
}
}.register(this)
Expand Down

0 comments on commit f51f7d5

Please sign in to comment.