Skip to content

Commit

Permalink
Add missing Test annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Apr 9, 2022
1 parent 2f5e18e commit fe3546c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -50,6 +50,7 @@ class DetektJvmSpec {
assertThat(argumentString).contains("--classpath")
}

@Test
fun `configures detekt type resolution task test`() {
val project = gradleRunner.buildProject()

Expand Down Expand Up @@ -132,6 +133,7 @@ class DetektJvmSpec {
it.setupProject()
}

@Test
fun `logs a warning`() {
gradleRunner.runTasksAndCheckResult(":detektMain") { buildResult ->
assertThat(buildResult.output).doesNotContain("report location set on detekt {} extension will be ignored")
Expand Down
Expand Up @@ -141,6 +141,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(3, 5)
}

@Test
fun `detects var declaration with MutableState via factory function, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand All @@ -162,6 +163,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(4, 5)
}

@Test
fun `detects var declaration with MutableState via calculation lambda, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand Down Expand Up @@ -450,6 +452,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(2, 1)
}

@Test
fun `detects var declaration with MutableState via factory function, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand All @@ -469,6 +472,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(3, 1)
}

@Test
fun `detects var declaration with MutableState via calculation lambda, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand Down Expand Up @@ -749,6 +753,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(3, 5)
}

@Test
fun `detects var declaration with MutableState via factory function, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand All @@ -770,6 +775,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(4, 5)
}

@Test
fun `detects var declaration with MutableState via calculation lambda, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand Down

0 comments on commit fe3546c

Please sign in to comment.