@@ -2,7 +2,7 @@ package de.mannodermaus.gradle.plugins.junit5.plugin
22
33import com.android.build.gradle.TestedExtension
44import com.google.common.truth.Truth.assertThat
5- import de.mannodermaus.gradle.plugins.junit5.internal. extensions.android
5+ import de.mannodermaus.gradle.plugins.junit5.extensions.android
66import de.mannodermaus.gradle.plugins.junit5.internal.extensions.junitPlatform
77import de.mannodermaus.gradle.plugins.junit5.tasks.AndroidJUnit5WriteFilters
88import de.mannodermaus.gradle.plugins.junit5.util.assertAll
@@ -41,19 +41,19 @@ interface AgpInstrumentationSupportTests : AgpVariantAwareTests {
4141 project.evaluate()
4242
4343 return listOf (
44- dynamicTest(" has a task for writing the debug filters DSL to a resource file" ) {
45- val task = project.tasks.get<AndroidJUnit5WriteFilters >(" writeFiltersDebugAndroidTest" )
46- assertAll(
47- { assertThat(task).isNotNull() },
48- { assertThat(task.includeTags.get()).containsExactly(" global-include-tag" ) },
49- { assertThat(task.excludeTags.get()).containsExactly(" debug-exclude-tag" ) }
50- )
51- },
44+ dynamicTest(" has a task for writing the debug filters DSL to a resource file" ) {
45+ val task = project.tasks.get<AndroidJUnit5WriteFilters >(" writeFiltersDebugAndroidTest" )
46+ assertAll(
47+ { assertThat(task).isNotNull() },
48+ { assertThat(task.includeTags.get()).containsExactly(" global-include-tag" ) },
49+ { assertThat(task.excludeTags.get()).containsExactly(" debug-exclude-tag" ) }
50+ )
51+ },
5252
53- dynamicTest(" has no task for writing the release DSL to a resource file" ) {
54- val task = project.tasks.findByName(" writeFiltersReleaseAndroidTest" )
55- assertThat(task).isNull()
56- }
53+ dynamicTest(" has no task for writing the release DSL to a resource file" ) {
54+ val task = project.tasks.findByName(" writeFiltersReleaseAndroidTest" )
55+ assertThat(task).isNull()
56+ }
5757 )
5858 }
5959
@@ -96,31 +96,31 @@ interface AgpInstrumentationSupportTests : AgpVariantAwareTests {
9696 project.evaluate()
9797
9898 return listOf (
99- dynamicTest(" has a task for writing the freeDebug filters DSL to a resource file" ) {
100- val task = project.tasks.get<AndroidJUnit5WriteFilters >(" writeFiltersFreeDebugAndroidTest" )
101- assertThat(task).isNotNull()
102- assertThat(task.includeTags.get()).containsExactly(" global-include-tag" , " freeDebug-include-tag" )
103- assertThat(task.excludeTags.get()).containsExactly(" global-exclude-tag" )
104- },
99+ dynamicTest(" has a task for writing the freeDebug filters DSL to a resource file" ) {
100+ val task = project.tasks.get<AndroidJUnit5WriteFilters >(" writeFiltersFreeDebugAndroidTest" )
101+ assertThat(task).isNotNull()
102+ assertThat(task.includeTags.get()).containsExactly(" global-include-tag" , " freeDebug-include-tag" )
103+ assertThat(task.excludeTags.get()).containsExactly(" global-exclude-tag" )
104+ },
105105
106- dynamicTest(" has a task for writing the paidDebug filters DSL to a resource file" ) {
107- val task = project.tasks.get<AndroidJUnit5WriteFilters >(" writeFiltersPaidDebugAndroidTest" )
108- assertThat(task).isNotNull()
109- assertThat(task.includeTags.get()).containsExactly(" global-include-tag" )
110- assertThat(task.excludeTags.get()).containsExactly(" global-exclude-tag" )
111- },
106+ dynamicTest(" has a task for writing the paidDebug filters DSL to a resource file" ) {
107+ val task = project.tasks.get<AndroidJUnit5WriteFilters >(" writeFiltersPaidDebugAndroidTest" )
108+ assertThat(task).isNotNull()
109+ assertThat(task.includeTags.get()).containsExactly(" global-include-tag" )
110+ assertThat(task.excludeTags.get()).containsExactly(" global-exclude-tag" )
111+ },
112112
113- dynamicTest(" doesn't have tasks for writing the release filters DSL to a resource file" ) {
114- assertThat(project.tasks.findByName(" writeFiltersFreeReleaseAndroidTest" )).isNull()
115- assertThat(project.tasks.findByName(" writeFiltersPaidReleaseAndroidTest" )).isNull()
116- }
113+ dynamicTest(" doesn't have tasks for writing the release filters DSL to a resource file" ) {
114+ assertThat(project.tasks.findByName(" writeFiltersFreeReleaseAndroidTest" )).isNull()
115+ assertThat(project.tasks.findByName(" writeFiltersPaidReleaseAndroidTest" )).isNull()
116+ }
117117 )
118118 }
119119}
120120
121121private fun Project.setupInstrumentationTests () {
122122 android.defaultConfig {
123- it.testInstrumentationRunnerArgument( " runnerBuilder" , " de.mannodermaus.junit5.AndroidJUnit5Builder" )
123+ testInstrumentationRunnerArguments[ " runnerBuilder" ] = " de.mannodermaus.junit5.AndroidJUnit5Builder"
124124 }
125125 dependencies.add(" androidTestRuntimeOnly" , " de.mannodermaus.junit5:android-test-runner:+" )
126126}
0 commit comments