mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 07:57:12 -07:00
Remove unnecessary @Guice.
This commit is contained in:
parent
ba98592f49
commit
f83bdfe3b2
11 changed files with 14 additions and 29 deletions
|
@ -4,11 +4,9 @@ import com.beust.kobalt.api.KobaltContext
|
|||
import com.google.inject.Inject
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.testng.annotations.DataProvider
|
||||
import org.testng.annotations.Guice
|
||||
import org.testng.annotations.Test
|
||||
import java.io.File
|
||||
|
||||
@Guice(modules = arrayOf(TestModule::class))
|
||||
class ContextTest @Inject constructor(val context: KobaltContext) : BaseTest() {
|
||||
|
||||
val GROUP = "org.testng"
|
||||
|
|
|
@ -21,7 +21,7 @@ class IncludeExcludeTest : KobaltTest() {
|
|||
val A_HTML = "a.html"
|
||||
|
||||
@BeforeClass
|
||||
fun bc() {
|
||||
fun bc2() {
|
||||
topDirectory = Files.createTempDirectory("kobaltTest-").toFile()
|
||||
directory = File(topDirectory, "com/beust")
|
||||
directory.mkdirs()
|
||||
|
|
|
@ -2,10 +2,8 @@ package com.beust.kobalt
|
|||
|
||||
import com.beust.kobalt.api.Kobalt
|
||||
import org.testng.annotations.BeforeSuite
|
||||
import org.testng.annotations.Guice
|
||||
|
||||
@Guice(modules = arrayOf(TestModule::class))
|
||||
open class KobaltTest {
|
||||
open class KobaltTest: BaseTest() {
|
||||
companion object {
|
||||
@BeforeSuite
|
||||
fun bs() {
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package com.beust.kobalt.internal
|
||||
|
||||
import com.beust.kobalt.TestModule
|
||||
import com.beust.kobalt.BaseTest
|
||||
import com.beust.kobalt.app.BuildFiles
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.testng.annotations.Guice
|
||||
import org.testng.annotations.Test
|
||||
import java.io.File
|
||||
|
||||
@Guice(modules = arrayOf(TestModule::class))
|
||||
class BlockExtractorTest {
|
||||
class BlockExtractorTest : BaseTest() {
|
||||
|
||||
@Test
|
||||
fun verifyExtraction() {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.beust.kobalt.internal
|
||||
|
||||
import com.beust.kobalt.BaseTest
|
||||
import com.beust.kobalt.TestModule
|
||||
import com.beust.kobalt.api.Kobalt
|
||||
import com.beust.kobalt.app.BuildFileCompiler
|
||||
import com.beust.kobalt.maven.DependencyManager
|
||||
|
@ -9,10 +8,8 @@ import com.beust.kobalt.maven.aether.Scope
|
|||
import com.google.inject.Inject
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.testng.annotations.DataProvider
|
||||
import org.testng.annotations.Guice
|
||||
import org.testng.annotations.Test
|
||||
|
||||
@Guice(modules = arrayOf(TestModule::class))
|
||||
class ExcludeTest @Inject constructor(compilerFactory: BuildFileCompiler.IFactory,
|
||||
val dependencyManager: DependencyManager) : BaseTest(compilerFactory) {
|
||||
|
||||
|
|
|
@ -9,11 +9,9 @@ import com.beust.kobalt.app.BuildFileCompiler
|
|||
import com.google.inject.Inject
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.testng.annotations.DataProvider
|
||||
import org.testng.annotations.Guice
|
||||
import org.testng.annotations.Test
|
||||
import java.util.*
|
||||
|
||||
@Guice(modules = arrayOf(TestModule::class))
|
||||
class ProfileTest @Inject constructor(compilerFactory: BuildFileCompiler.IFactory) : BaseTest(compilerFactory) {
|
||||
|
||||
private fun runTestWithProfile(enabled: Boolean, oldSyntax: Boolean) : Project {
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
package com.beust.kobalt.internal
|
||||
|
||||
import com.beust.kobalt.BaseTest
|
||||
import com.beust.kobalt.TestModule
|
||||
import com.google.common.collect.ArrayListMultimap
|
||||
import com.google.common.collect.Multimap
|
||||
import com.google.common.collect.TreeMultimap
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.testng.annotations.Guice
|
||||
import org.testng.annotations.Test
|
||||
|
||||
@Guice(modules = arrayOf(TestModule::class))
|
||||
class TaskManagerTest : BaseTest() {
|
||||
|
||||
class DryRunGraphExecutor<T>(val graph: DynamicGraph<T>) {
|
||||
|
|
|
@ -14,7 +14,6 @@ import org.eclipse.aether.util.filter.AndDependencyFilter
|
|||
import org.testng.annotations.Guice
|
||||
import org.testng.annotations.Test
|
||||
|
||||
@Guice(modules = arrayOf(TestModule::class))
|
||||
class DependencyManagerTest @Inject constructor(val dependencyManager: DependencyManager,
|
||||
compilerFactory: BuildFileCompiler.IFactory) : BaseTest(compilerFactory) {
|
||||
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
package com.beust.kobalt.maven
|
||||
|
||||
import com.beust.kobalt.TestModule
|
||||
import com.beust.kobalt.BaseTest
|
||||
import com.beust.kobalt.misc.KobaltExecutors
|
||||
import com.beust.kobalt.misc.StringVersion
|
||||
import org.testng.Assert
|
||||
import org.testng.annotations.*
|
||||
import org.testng.annotations.AfterClass
|
||||
import org.testng.annotations.BeforeClass
|
||||
import org.testng.annotations.DataProvider
|
||||
import org.testng.annotations.Test
|
||||
import java.util.concurrent.ExecutorService
|
||||
import javax.inject.Inject
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
@Guice(modules = arrayOf(TestModule::class))
|
||||
class DependencyTest @Inject constructor(val executors: KobaltExecutors) {
|
||||
class DependencyTest @Inject constructor(val executors: KobaltExecutors) : BaseTest() {
|
||||
|
||||
@DataProvider
|
||||
fun dpVersions(): Array<Array<out Any>> {
|
||||
|
@ -29,7 +31,7 @@ class DependencyTest @Inject constructor(val executors: KobaltExecutors) {
|
|||
private var executor: ExecutorService by Delegates.notNull()
|
||||
|
||||
@BeforeClass
|
||||
fun bc() {
|
||||
fun bc2() {
|
||||
executor = executors.newExecutor("DependencyTest", 5)
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class DownloadTest @Inject constructor(
|
|||
private var executor: ExecutorService by Delegates.notNull()
|
||||
|
||||
@BeforeClass
|
||||
fun bc() {
|
||||
fun bc2() {
|
||||
executor = executors.newExecutor("DependentTest", 5)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.beust.kobalt.misc
|
||||
|
||||
import com.beust.kobalt.TestModule
|
||||
import com.beust.kobalt.BaseTest
|
||||
import com.beust.kobalt.internal.KobaltSettings
|
||||
import com.beust.kobalt.internal.KobaltSettingsXml
|
||||
import com.beust.kobalt.maven.DependencyManager
|
||||
|
@ -18,11 +18,9 @@ import org.eclipse.aether.resolution.ArtifactResult
|
|||
import org.eclipse.aether.resolution.DependencyRequest
|
||||
import org.eclipse.aether.resolution.DependencyResolutionException
|
||||
import org.testng.annotations.DataProvider
|
||||
import org.testng.annotations.Guice
|
||||
import org.testng.annotations.Test
|
||||
|
||||
@Guice(modules = arrayOf(TestModule::class))
|
||||
class MavenResolverTest {
|
||||
class MavenResolverTest : BaseTest() {
|
||||
@Inject
|
||||
lateinit var resolver: KobaltMavenResolver
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue