File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
plugins/package-curation-providers/file/src/test/kotlin Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,11 @@ import io.kotest.matchers.collections.shouldContainAll
2727import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
2828import io.kotest.matchers.should
2929import io.kotest.matchers.shouldBe
30+ import io.kotest.matchers.string.endWith
31+ import io.kotest.matchers.string.startWith
3032
3133import java.io.File
34+ import java.io.IOException
3235
3336import org.ossreviewtoolkit.model.Identifier
3437import org.ossreviewtoolkit.model.Package
@@ -111,17 +114,17 @@ class FilePackageCurationProviderTest : StringSpec() {
111114 " Provider throws an exception if the curations file is not de-serializable" {
112115 val curationsFile = File (" src/test/assets/package-curations-not-deserializable.yml" )
113116
114- shouldThrow<Exception > {
117+ shouldThrow<IOException > {
115118 FilePackageCurationProvider (curationsFile)
116- }
119+ }.message should startWith( " Failed parsing package curation(s) " )
117120 }
118121
119122 " Provider throws an exception if the curations file does not exist" {
120123 val curationsFile = File (" src/test/assets/package-curations-not-existing.yml" )
121124
122- shouldThrow<Exception > {
125+ shouldThrow<IllegalArgumentException > {
123126 FilePackageCurationProvider (curationsFile)
124- }
127+ }.message should endWith( " does not exist. " )
125128 }
126129 }
127130}
You can’t perform that action at this time.
0 commit comments