We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c8d3ec commit 8ba5d1dCopy full SHA for 8ba5d1d
model/src/test/kotlin/licenses/TestUtils.kt
@@ -28,8 +28,8 @@ import org.ossreviewtoolkit.utils.spdx.SpdxSingleLicenseExpression
28
29
fun containLicensesExactly(vararg licenses: String): Matcher<Iterable<ResolvedLicense>?> =
30
neverNullMatcher { value ->
31
- val expected = licenses.map { SpdxExpression.parse(it) as SpdxSingleLicenseExpression }.toSet()
32
- val actual = value.map { it.license }.toSet()
+ val expected = licenses.mapTo(mutableSetOf()) { SpdxExpression.parse(it) as SpdxSingleLicenseExpression }
+ val actual = value.mapTo(mutableSetOf()) { it.license }
33
34
containExactly(expected).test(actual)
35
}
0 commit comments