-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fjern client-ID fra service river (#551)
- Loading branch information
Showing
16 changed files
with
158 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...c/test/kotlin/no/nav/helsearbeidsgiver/inntektsmelding/api/trenger/TrengerProducerTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package no.nav.helsearbeidsgiver.inntektsmelding.api.trenger | ||
|
||
import io.kotest.core.spec.style.FunSpec | ||
import io.kotest.matchers.ints.shouldBeExactly | ||
import io.kotest.matchers.maps.shouldContainExactly | ||
import no.nav.helse.rapids_rivers.testsupport.TestRapid | ||
import no.nav.helsearbeidsgiver.felles.EventName | ||
import no.nav.helsearbeidsgiver.felles.Key | ||
import no.nav.helsearbeidsgiver.felles.json.toJson | ||
import no.nav.helsearbeidsgiver.felles.json.toMap | ||
import no.nav.helsearbeidsgiver.felles.test.rapidsrivers.firstMessage | ||
import no.nav.helsearbeidsgiver.utils.json.toJson | ||
import no.nav.helsearbeidsgiver.utils.test.wrapper.genererGyldig | ||
import no.nav.helsearbeidsgiver.utils.wrapper.Fnr | ||
import java.util.UUID | ||
|
||
class TrengerProducerTest : FunSpec({ | ||
val testRapid = TestRapid() | ||
val producer = TrengerProducer(testRapid) | ||
|
||
test("publiserer melding på forventet format") { | ||
val forespoerselId = UUID.randomUUID() | ||
val avsenderFnr = Fnr.genererGyldig().verdi | ||
|
||
val transaksjonId = producer.publish(HentForespoerselRequest(forespoerselId), avsenderFnr) | ||
|
||
testRapid.inspektør.size shouldBeExactly 1 | ||
testRapid.firstMessage().toMap() shouldContainExactly mapOf( | ||
Key.EVENT_NAME to EventName.TRENGER_REQUESTED.toJson(), | ||
Key.UUID to transaksjonId.toJson(), | ||
Key.FORESPOERSEL_ID to forespoerselId.toJson(), | ||
Key.ARBEIDSGIVER_ID to avsenderFnr.toJson() | ||
) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.