Skip to content

Commit

Permalink
ClearlyDefinedPackageCurationProviderTest: Add a test for the product…
Browse files Browse the repository at this point in the history
…ion server

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Jun 29, 2020
1 parent 83c2a18 commit 1ba51c8
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ import org.ossreviewtoolkit.clearlydefined.ClearlyDefinedService.Server
import org.ossreviewtoolkit.model.Identifier

class ClearlyDefinedPackageCurationProviderTest : WordSpec({
"The production server" should {
"return a curation for a Maven package" {
val provider = ClearlyDefinedPackageCurationProvider()

val identifier = Identifier("Maven:javax.servlet:javax.servlet-api:3.1.0")
val curations = provider.getCurationsFor(identifier)

curations should haveSize(1)
curations.first().data.declaredLicenses shouldBe sortedSetOf(
"CDDL-1.0 OR GPL-2.0-only WITH Classpath-exception-2.0"
)
}
}

"The development server" should {
"return a curation for an NPM package" {
val provider = ClearlyDefinedPackageCurationProvider(Server.DEVELOPMENT)
Expand Down

0 comments on commit 1ba51c8

Please sign in to comment.