1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-25 07:57:12 -07:00

Tests for optional dependencies.

This commit is contained in:
Cedric Beust 2017-04-07 15:26:11 -07:00
parent 7e6c68c689
commit 51090ad8b4

View file

@ -82,6 +82,16 @@ class MavenResolverTest : BaseTest() {
repos = listOf("https://hub.spigotmc.org/nexus/content/repositories/snapshots"))
}
@Test(enabled = false)
fun shouldIgnoreOptionalResolutions() {
resolver.resolve("org.springframework:spring-context-support:2.5.6.SEC03")
}
@Test(expectedExceptions = arrayOf(DependencyResolutionException::class))
fun shouldThrowIfResolutionFails() {
resolver.resolve("org.testng:bogus:6.11")
}
private fun resolve(id: String): List<ArtifactResult> {
val system = Booter.newRepositorySystem()
val session = Booter.newRepositorySystemSession(system,