Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
formatKotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
robertkittilsen committed Apr 15, 2024
1 parent d20e74b commit 76902a6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class PeriodeConsumer(
private val arbeidssoekerService: ArbeidssoekerService
) {
private var running = true

fun start() {
logger.info("Lytter på topic $topic")
consumer.subscribe(listOf(topic))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,25 @@ class PeriodeConsumerTest : FreeSpec({
private fun createConsumerRecords(): ConsumerRecords<Long, Periode> {
val records = mutableMapOf<TopicPartition, MutableList<ConsumerRecord<Long, Periode>>>()
val topic = "test-topic"
records[TopicPartition(topic, 0)] = mutableListOf(ConsumerRecord(topic, 0, 0, 1L, Periode(
UUID.randomUUID(),
"12345678901",
Metadata(
Instant.now(),
Bruker(
BrukerType.SLUTTBRUKER,
"12345678901"
),
"test",
"test"
),
null
)))
records[TopicPartition(topic, 0)] =
mutableListOf(
ConsumerRecord(
topic, 0, 0, 1L,
Periode(
UUID.randomUUID(),
"12345678901",
Metadata(
Instant.now(),
Bruker(
BrukerType.SLUTTBRUKER,
"12345678901"
),
"test",
"test"
),
null
)
)
)
return ConsumerRecords(records)
}

0 comments on commit 76902a6

Please sign in to comment.