Skip to content

Commit f1d6e97

Browse files
committed
test(model): Add locations for detected licenses
This is a preparation for extending test coverage. Note the different spellings of the files containing the findings. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 2482d1d commit f1d6e97

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

model/src/test/kotlin/licenses/ResolvedLicenseInfoTest.kt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,15 @@ private val RESOLVED_LICENSE_INFO: ResolvedLicenseInfo by lazy {
193193
ResolvedOriginalExpression("$APACHE OR $MIT".toSpdx(), LicenseSource.DECLARED),
194194
ResolvedOriginalExpression("$MIT OR $GPL".toSpdx(), LicenseSource.DETECTED)
195195
),
196-
locations = emptySet()
196+
locations = setOf(
197+
ResolvedLicenseLocation(
198+
provenance = UnknownProvenance,
199+
location = TextLocation("LICENSE", TextLocation.UNKNOWN_LINE),
200+
appliedCuration = null,
201+
matchingPathExcludes = emptyList(),
202+
copyrights = emptySet()
203+
)
204+
)
197205
),
198206
ResolvedLicense(
199207
license = GPL.toSpdx() as SpdxSingleLicenseExpression,
@@ -202,7 +210,15 @@ private val RESOLVED_LICENSE_INFO: ResolvedLicenseInfo by lazy {
202210
ResolvedOriginalExpression("$MIT OR $GPL".toSpdx(), LicenseSource.DETECTED),
203211
ResolvedOriginalExpression("$BSD OR $GPL".toSpdx(), LicenseSource.CONCLUDED)
204212
),
205-
locations = emptySet()
213+
locations = setOf(
214+
ResolvedLicenseLocation(
215+
provenance = UnknownProvenance,
216+
location = TextLocation("LICENCE", TextLocation.UNKNOWN_LINE),
217+
appliedCuration = null,
218+
matchingPathExcludes = emptyList(),
219+
copyrights = emptySet()
220+
)
221+
)
206222
),
207223
ResolvedLicense(
208224
license = BSD.toSpdx() as SpdxSingleLicenseExpression,

0 commit comments

Comments
 (0)