mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Fix tests.
This commit is contained in:
parent
b2a187d4d8
commit
fd19860493
2 changed files with 8 additions and 4 deletions
|
@ -18,8 +18,9 @@ public class DepFactory @Inject constructor(val localRepo: LocalRepo,
|
|||
val pomFactory: Pom.IFactory) {
|
||||
|
||||
companion object {
|
||||
val defExecutor =
|
||||
Kobalt.INJECTOR.getInstance(Key.get(ExecutorService::class.java, DependencyExecutor::class.java))
|
||||
val defExecutor : ExecutorService by lazy {
|
||||
Kobalt.INJECTOR.getInstance(Key.get(ExecutorService::class.java, DependencyExecutor::class.java))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.beust.kobalt.maven
|
|||
|
||||
import com.beust.kobalt.Args
|
||||
import com.beust.kobalt.KobaltTest
|
||||
import com.beust.kobalt.api.Kobalt
|
||||
import com.beust.kobalt.app.ProjectGenerator
|
||||
import com.beust.kobalt.internal.PluginInfo
|
||||
import com.google.inject.Inject
|
||||
|
@ -9,7 +10,7 @@ import org.testng.Assert
|
|||
import org.testng.annotations.Test
|
||||
import java.io.File
|
||||
|
||||
class PomTest @Inject constructor(val pluginInfo: PluginInfo) : KobaltTest() {
|
||||
class PomTest @Inject constructor() : KobaltTest() {
|
||||
@Test
|
||||
fun importPom() {
|
||||
val pomSrc = File("src/test/resources/pom.xml")
|
||||
|
@ -55,7 +56,9 @@ class PomTest @Inject constructor(val pluginInfo: PluginInfo) : KobaltTest() {
|
|||
val args = Args()
|
||||
args.buildFile = file.absolutePath
|
||||
args.init = true
|
||||
ProjectGenerator(pluginInfo).run(args)
|
||||
|
||||
ProjectGenerator(Kobalt.INJECTOR.getInstance(PluginInfo::class.java)).run(args)
|
||||
|
||||
var contents = file.readText()
|
||||
Assert.assertTrue(contents.contains("group = \"${pom.groupId}\""), "Should find the group defined")
|
||||
Assert.assertTrue(contents.contains("name = \"${pom.name}\""), "Should find the name defined")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue