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

Fix tests.

This commit is contained in:
Cedric Beust 2015-12-15 21:40:40 -08:00
parent b2a187d4d8
commit fd19860493
2 changed files with 8 additions and 4 deletions

View file

@ -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")