aboutsummaryrefslogtreecommitdiff
path: root/sample/src/androidTest
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2020-06-27 14:53:12 -0700
committerAllan Wang <me@allanwang.ca>2020-06-27 14:53:12 -0700
commit2368c3fe526b99427560332e2ec3ecec57870294 (patch)
tree322e6852a59ef773577a19ee5dc01f2cd8f1ac23 /sample/src/androidTest
parent3f28748f959dedb6f7baee7c1c27e343080e8c3f (diff)
downloadkau-2368c3fe526b99427560332e2ec3ecec57870294.tar.gz
kau-2368c3fe526b99427560332e2ec3ecec57870294.tar.bz2
kau-2368c3fe526b99427560332e2ec3ecec57870294.zip
Spotless
Diffstat (limited to 'sample/src/androidTest')
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt2
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt1
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/BaseTest.kt19
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt17
4 files changed, 34 insertions, 5 deletions
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt
index bfdcfff..cc45b4e 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt
@@ -29,6 +29,7 @@ import androidx.test.rule.ActivityTestRule
import ca.allanwang.kau.sample.test.BaseTest
import dagger.hilt.android.testing.HiltAndroidTest
import dagger.hilt.android.testing.UninstallModules
+import javax.inject.Inject
import kotlin.test.assertFalse
import kotlin.test.assertTrue
import org.hamcrest.BaseMatcher
@@ -41,7 +42,6 @@ import org.junit.Test
import org.junit.rules.RuleChain
import org.junit.rules.TestRule
import org.junit.runner.RunWith
-import javax.inject.Inject
/**
* Created by Allan Wang on 21/12/2018.
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt
index da53ce1..89e74c7 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt
@@ -27,7 +27,6 @@ import dagger.hilt.android.testing.HiltTestApplication
import org.junit.rules.TestRule
import org.junit.runner.Description
import org.junit.runners.model.Statement
-import java.lang.RuntimeException
class SampleTestRunner : AndroidJUnitRunner() {
override fun newApplication(
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/BaseTest.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/BaseTest.kt
index c3a17ea..1cba88f 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/BaseTest.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/BaseTest.kt
@@ -1,8 +1,23 @@
+/*
+ * Copyright 2020 Allan Wang
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package ca.allanwang.kau.sample.test
import dagger.hilt.android.testing.HiltAndroidRule
-import org.junit.Rule
import kotlin.test.BeforeTest
+import org.junit.Rule
abstract class BaseTest {
@Suppress("LeakingThis")
@@ -14,4 +29,4 @@ abstract class BaseTest {
fun before() {
hiltRule.inject()
}
-} \ No newline at end of file
+}
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
index 4e49810..74da014 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/test/TestModules.kt
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2020 Allan Wang
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package ca.allanwang.kau.sample.test
import ca.allanwang.kau.kpref.KPrefFactory
@@ -12,4 +27,4 @@ import dagger.hilt.android.components.ApplicationComponent
object PrefFactoryTestModule {
@Provides
fun factory(): KPrefFactory = KPrefFactoryInMemory
-} \ No newline at end of file
+}