From f6dfe3f5dd115e4dac94cae285556c620118eca6 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Sat, 5 Sep 2020 13:05:30 +0200 Subject: [PATCH] add deprecation test --- src/test/kotlin/CoverallsJacocoPluginTest.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/kotlin/CoverallsJacocoPluginTest.kt b/src/test/kotlin/CoverallsJacocoPluginTest.kt index e94bb73..7981c87 100644 --- a/src/test/kotlin/CoverallsJacocoPluginTest.kt +++ b/src/test/kotlin/CoverallsJacocoPluginTest.kt @@ -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(relaxed = true)