Skip to content

Commit

Permalink
add deprecation test
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaztec committed Sep 5, 2020
1 parent d702af6 commit f6dfe3f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/test/kotlin/CoverallsJacocoPluginTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,21 @@ import org.gradle.api.tasks.SourceSetContainer
import org.gradle.testfixtures.ProjectBuilder
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import kotlin.reflect.full.memberProperties
import kotlin.reflect.jvm.isAccessible

internal class CoverallsJacocoPluginTest {
@Test
fun `CoverallsJacocoPluginExtension deprecates rootPackage`() {
val ext = CoverallsJacocoPluginExtension()
val actual = ext::class.memberProperties.find { it.name == "rootPackage" }!!.let {
it.isAccessible = true
it.annotations.first().annotationClass
}

assertEquals(Deprecated::class, actual)
}

@Test
fun `CoverallsJacocoPlugin creates extension and task with correct name`() {
val project = mockk<Project>(relaxed = true)
Expand Down

0 comments on commit f6dfe3f

Please sign in to comment.