-
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.
Merge branch 'main' into dev/service-med-steg-opprett-oppgave
- Loading branch information
Showing
42 changed files
with
930 additions
and
719 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
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
.../kotlin/no/nav/helsearbeidsgiver/inntektsmelding/api/kvittering/KvitteringProducerTest.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.kvittering | ||
|
||
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 java.util.UUID | ||
|
||
class KvitteringProducerTest : | ||
FunSpec({ | ||
val testRapid = TestRapid() | ||
val producer = KvitteringProducer(testRapid) | ||
|
||
test("publiserer melding på forventet format") { | ||
val transaksjonId = UUID.randomUUID() | ||
val forespoerselId = UUID.randomUUID() | ||
|
||
producer.publish(transaksjonId, forespoerselId) | ||
|
||
testRapid.inspektør.size shouldBeExactly 1 | ||
testRapid.firstMessage().toMap() shouldContainExactly | ||
mapOf( | ||
Key.EVENT_NAME to EventName.KVITTERING_REQUESTED.toJson(), | ||
Key.UUID to transaksjonId.toJson(), | ||
Key.DATA to "".toJson(), | ||
Key.FORESPOERSEL_ID to forespoerselId.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
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.