mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Rename DepFactory -> DependencyFactory.
This commit is contained in:
parent
21bc80b832
commit
9cc5d62cd3
18 changed files with 41 additions and 60 deletions
|
@ -10,7 +10,7 @@ import javax.inject.Inject
|
|||
import kotlin.properties.Delegates
|
||||
|
||||
@Guice(modules = arrayOf(TestModule::class))
|
||||
public class DependencyTest @Inject constructor(val depFactory: DepFactory,
|
||||
public class DependencyTest @Inject constructor(val depFactory: DependencyFactory,
|
||||
val executors: KobaltExecutors) {
|
||||
|
||||
@DataProvider
|
||||
|
|
|
@ -18,7 +18,7 @@ class DownloadTest @Inject constructor(
|
|||
val localRepo: LocalRepo,
|
||||
val pomFactory: Pom.IFactory,
|
||||
val dependencyManager: DependencyManager,
|
||||
val depFactory: DepFactory,
|
||||
val depFactory: DependencyFactory,
|
||||
val aether: KobaltAether,
|
||||
val executors: KobaltExecutors) : KobaltTest() {
|
||||
private var executor: ExecutorService by Delegates.notNull()
|
||||
|
@ -40,7 +40,7 @@ class DownloadTest @Inject constructor(
|
|||
|
||||
if (success) {
|
||||
arrayListOf("$groupId:$artifactId:$version", "$groupId:$artifactId:$previousVersion").forEach {
|
||||
val dep = depFactory.create(it, executor = executor)
|
||||
val dep = depFactory.create(it)
|
||||
val future = dep.jarFile
|
||||
val file = future.get()
|
||||
Assert.assertTrue(file.exists(), "Couldn't find ${file.absolutePath}")
|
||||
|
@ -60,7 +60,7 @@ class DownloadTest @Inject constructor(
|
|||
fun shouldDownloadNoVersion() {
|
||||
val success = deleteDir()
|
||||
if (success) {
|
||||
val dep = depFactory.create(idNoVersion, executor = executor)
|
||||
val dep = depFactory.create(idNoVersion)
|
||||
|
||||
val future = dep.jarFile
|
||||
val file = future.get()
|
||||
|
@ -77,7 +77,7 @@ class DownloadTest @Inject constructor(
|
|||
val range = "[2.5,)"
|
||||
val expected = "3.0-alpha-1"
|
||||
|
||||
val dep = depFactory.create("javax.servlet:servlet-api:$range", executor = executor)
|
||||
val dep = depFactory.create("javax.servlet:servlet-api:$range")
|
||||
val future = dep.jarFile
|
||||
val file = future.get()
|
||||
Assert.assertEquals(file.name, "servlet-api-$expected.jar")
|
||||
|
@ -87,7 +87,7 @@ class DownloadTest @Inject constructor(
|
|||
@Test
|
||||
fun shouldFindLocalJar() {
|
||||
depFactory.create("$idNoVersion$version")
|
||||
val dep = depFactory.create("$idNoVersion$version", executor = executor)
|
||||
val dep = depFactory.create("$idNoVersion$version")
|
||||
val future = dep.jarFile
|
||||
// Assert.assertTrue(future is CompletedFuture)
|
||||
val file = future.get()
|
||||
|
|
|
@ -6,7 +6,7 @@ import org.testng.Assert
|
|||
import org.testng.annotations.Test
|
||||
|
||||
@Test
|
||||
class PomGenerationTest @Inject constructor(val depFactory: DepFactory): KobaltTest() {
|
||||
class PomGenerationTest @Inject constructor(val depFactory: DependencyFactory): KobaltTest() {
|
||||
fun shouldGenerateDependencies() {
|
||||
val md = depFactory.create("org.testng:testng:6.9.9").toMavenDependencies()
|
||||
Assert.assertEquals(md.groupId, "org.testng")
|
||||
|
|
|
@ -10,7 +10,7 @@ import javax.inject.Inject
|
|||
|
||||
@Test
|
||||
@org.testng.annotations.Guice(modules = arrayOf(TestModule::class))
|
||||
class RemoteRepoTest @Inject constructor(val repoFinder: RepoFinder, val depFactory: DepFactory,
|
||||
class RemoteRepoTest @Inject constructor(val repoFinder: RepoFinder, val depFactory: DependencyFactory,
|
||||
@DependencyExecutor val executor: ExecutorService, val args: Args){
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue