mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Remove unused classes, fix a few tests.
This commit is contained in:
parent
913433dab9
commit
dda854963c
10 changed files with 27 additions and 360 deletions
|
@ -164,16 +164,5 @@ class DownloadTest @Inject constructor(
|
|||
val d = closure.filter { it.id.contains("eclipse-collections-api")}
|
||||
Assert.assertEquals(d.size, 1)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun containerPom() {
|
||||
val repoResult = RepoFinderCallable("org.jetbrains.kotlin:kotlin-project:1.0.0",
|
||||
HostConfig("http://repo1.maven.org/maven2/"),
|
||||
localRepo, pomFactory, dependencyManager).call()
|
||||
val rr = repoResult[0]
|
||||
Assert.assertTrue(rr.found)
|
||||
Assert.assertTrue(rr.localPath != null && rr.localPath!!.startsWith("junit/junit"))
|
||||
Assert.assertEquals(rr.version.toString(), "4.12")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,13 @@ class MavenIdTest {
|
|||
@DataProvider
|
||||
fun dp() : Array<Array<out Any?>> {
|
||||
return arrayOf(
|
||||
arrayOf("javax.inject:javax.inject:", "javax.inject", "javax.inject", null, null, null),
|
||||
arrayOf("javax.inject:javax.inject:", "javax.inject", "javax.inject", "(0,]", "jar", null),
|
||||
arrayOf("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.0.0-beta-1038",
|
||||
"org.jetbrains.kotlin", "kotlin-compiler-embeddable", "1.0.0-beta-1038",
|
||||
null, null),
|
||||
arrayOf("com.google.inject:guice:4.0:no_aop",
|
||||
"com.google.inject", "guice", "4.0", null, "no_aop"),
|
||||
arrayOf("com.android.support:appcompat-v7:22.2.1@aar",
|
||||
"jar", null),
|
||||
arrayOf("com.google.inject:guice::no_aop:4.0",
|
||||
"com.google.inject", "guice", "4.0", "jar", "no_aop"),
|
||||
arrayOf("com.android.support:appcompat-v7:aar:22.2.1",
|
||||
"com.android.support", "appcompat-v7", "22.2.1", "aar", null)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
package com.beust.kobalt.maven
|
||||
|
||||
import com.beust.kobalt.TestModule
|
||||
import org.testng.Assert
|
||||
import org.testng.annotations.Test
|
||||
import javax.inject.Inject
|
||||
|
||||
@Test
|
||||
@org.testng.annotations.Guice(modules = arrayOf(TestModule::class))
|
||||
class RemoteRepoTest @Inject constructor(val repoFinder: RepoFinder, val dependencyManager: DependencyManager){
|
||||
|
||||
@Test
|
||||
fun mavenMetadata() {
|
||||
val dep = dependencyManager.create("org.codehaus.groovy:groovy-all:")
|
||||
// Note: this test might fail if a new version of Groovy gets uploaded, need
|
||||
// to find a stable (i.e. abandoned) package
|
||||
with(dep.id.split(":")[2]) {
|
||||
Assert.assertTrue(this == "2.4.5" || this == "2.4.6")
|
||||
}
|
||||
}
|
||||
|
||||
@Test(enabled = false)
|
||||
fun metadataForSnapshots() {
|
||||
val jar = dependencyManager.create("org.apache.maven.wagon:wagon-provider-test:2.10-SNAPSHOT")
|
||||
Assert.assertTrue(jar.jarFile.get().exists())
|
||||
}
|
||||
|
||||
fun resolveAarWithVersion() {
|
||||
val repoResult = repoFinder.findCorrectRepo("com.jakewharton.timber:timber:4.1.0")
|
||||
with(repoResult) {
|
||||
Assert.assertEquals(path, "com/jakewharton/timber/timber/4.1.0/timber-4.1.0.aar")
|
||||
}
|
||||
}
|
||||
|
||||
@Test(groups = arrayOf("broken"), enabled = false)
|
||||
fun resolveAarWithoutVersion() {
|
||||
val repoResult = repoFinder.findCorrectRepo("com.jakewharton.timber:timber:")
|
||||
with(repoResult) {
|
||||
Assert.assertEquals(path, "com/jakewharton/timber/timber/4.1.0/timber-4.1.0.aar")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue