Skip to content

Commit

Permalink
fix(health-sdk): Fix copying of extractions in the tests
Browse files Browse the repository at this point in the history
IPC-295
  • Loading branch information
a-szotyori authored and llevente committed Jul 17, 2024
1 parent 33f6f99 commit dcb2041
Showing 1 changed file with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,29 @@ val extractions = ExtractionsContainer(
)

fun copyExtractions(extractions: ExtractionsContainer) = ExtractionsContainer(
extractions.specificExtractions.toMap(),
extractions.specificExtractions.toMap().mapValues { specificExtraction ->
SpecificExtraction(
specificExtraction.value.name,
specificExtraction.value.value,
specificExtraction.value.entity,
specificExtraction.value.box,
specificExtraction.value.candidate
)
},
extractions.compoundExtractions.map { (name, compoundExtraction) ->
name to CompoundExtraction(name, compoundExtraction.specificExtractionMaps.map { it.toMap() })
name to CompoundExtraction(
name,
compoundExtraction.specificExtractionMaps.map { specificExtractionMap ->
specificExtractionMap.toMap().mapValues { specificExtraction ->
SpecificExtraction(
specificExtraction.value.name,
specificExtraction.value.value,
specificExtraction.value.entity,
specificExtraction.value.box,
specificExtraction.value.candidate
)
}
})
}.toMap()
)

Expand Down

0 comments on commit dcb2041

Please sign in to comment.