File tree 14 files changed +78
-12
lines changed
java/com/example/jetcaster/core/data/testing/repository
src/test/kotlin/com/example/jetcaster/core/domain
14 files changed +78
-12
lines changed Original file line number Diff line number Diff line change
1
+ /build
Original file line number Diff line number Diff line change
1
+ plugins {
2
+ alias(libs.plugins.android.library)
3
+ alias(libs.plugins.kotlin.android)
4
+ }
5
+
6
+ android {
7
+ namespace = " com.example.jetcaster.core.data.testing"
8
+ compileSdk = libs.versions.compileSdk.get().toInt()
9
+
10
+ defaultConfig {
11
+ minSdk = libs.versions.minSdk.get().toInt()
12
+
13
+ testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
14
+ consumerProguardFiles(" consumer-rules.pro" )
15
+ }
16
+
17
+ buildTypes {
18
+ release {
19
+ isMinifyEnabled = false
20
+ proguardFiles(
21
+ getDefaultProguardFile(" proguard-android-optimize.txt" ),
22
+ " proguard-rules.pro"
23
+ )
24
+ }
25
+ }
26
+ compileOptions {
27
+ isCoreLibraryDesugaringEnabled = true
28
+ sourceCompatibility = JavaVersion .VERSION_17
29
+ targetCompatibility = JavaVersion .VERSION_17
30
+ }
31
+ }
32
+
33
+ dependencies {
34
+ implementation(libs.androidx.core.ktx)
35
+ implementation(projects.core.data)
36
+ coreLibraryDesugaring(libs.core.jdk.desugaring)
37
+ testImplementation(libs.junit)
38
+ testImplementation(libs.kotlinx.coroutines.test)
39
+ }
Original file line number Diff line number Diff line change
1
+ # Add project specific ProGuard rules here.
2
+ # You can control the set of applied configuration files using the
3
+ # proguardFiles setting in build.gradle.
4
+ #
5
+ # For more details, see
6
+ # http://developer.android.com/guide/developing/tools/proguard.html
7
+
8
+ # If your project uses WebView with JS, uncomment the following
9
+ # and specify the fully qualified class name to the JavaScript interface
10
+ # class:
11
+ #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
+ # public *;
13
+ #}
14
+
15
+ # Uncomment this to preserve the line number information for
16
+ # debugging stack traces.
17
+ #-keepattributes SourceFile,LineNumberTable
18
+
19
+ # If you keep the line number information, uncomment this to
20
+ # hide the original source file name.
21
+ #-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <manifest xmlns : android =" http://schemas.android.com/apk/res/android" >
3
+
4
+ </manifest >
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- package com.example.jetcaster.core.repository
17
+ package com.example.jetcaster.core.data.testing. repository
18
18
19
19
import com.example.jetcaster.core.data.database.model.Category
20
20
import com.example.jetcaster.core.data.database.model.EpisodeToPodcast
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- package com.example.jetcaster.core.repository
17
+ package com.example.jetcaster.core.data.testing. repository
18
18
19
19
import com.example.jetcaster.core.data.database.model.Episode
20
20
import com.example.jetcaster.core.data.database.model.EpisodeToPodcast
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- package com.example.jetcaster.core.repository
17
+ package com.example.jetcaster.core.data.testing. repository
18
18
19
19
import com.example.jetcaster.core.data.database.model.Category
20
20
import com.example.jetcaster.core.data.database.model.Podcast
Original file line number Diff line number Diff line change @@ -31,12 +31,11 @@ android {
31
31
}
32
32
33
33
dependencies {
34
- implementation(projects.core.data)
35
- implementation(project(" :core:domain" ))
34
+ implementation(projects.core.domain)
36
35
37
36
coreLibraryDesugaring(libs.core.jdk.desugaring)
38
37
39
38
testImplementation(libs.junit)
40
39
androidTestImplementation(libs.androidx.test.ext.junit)
41
40
androidTestImplementation(libs.androidx.test.espresso.core)
42
- }
41
+ }
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ android {
35
35
dependencies {
36
36
coreLibraryDesugaring(libs.core.jdk.desugaring)
37
37
implementation(projects.core.data)
38
+ implementation(projects.core.dataTesting)
38
39
39
40
// Dependency injection
40
41
implementation(libs.androidx.hilt.navigation.compose)
Original file line number Diff line number Diff line change 17
17
package com.example.jetcaster.core.domain
18
18
19
19
import com.example.jetcaster.core.data.database.model.Category
20
+ import com.example.jetcaster.core.data.testing.repository.TestCategoryStore
20
21
import com.example.jetcaster.core.model.asExternalModel
21
- import com.example.jetcaster.core.repository.TestCategoryStore
22
22
import kotlinx.coroutines.flow.first
23
23
import kotlinx.coroutines.test.runTest
24
24
import org.junit.Assert.assertEquals
Original file line number Diff line number Diff line change 17
17
package com.example.jetcaster.core.domain
18
18
19
19
import com.example.jetcaster.core.data.database.model.Episode
20
- import com.example.jetcaster.core.repository.TestEpisodeStore
21
- import com.example.jetcaster.core.repository.TestPodcastStore
22
- import java.time.OffsetDateTime
20
+ import com.example.jetcaster.core.data.testing.repository.TestEpisodeStore
21
+ import com.example.jetcaster.core.data.testing.repository.TestPodcastStore
23
22
import kotlinx.coroutines.flow.first
24
23
import kotlinx.coroutines.test.runTest
25
24
import org.junit.Assert.assertTrue
26
25
import org.junit.Test
26
+ import java.time.OffsetDateTime
27
27
28
28
class GetLatestFollowedEpisodesUseCaseTest {
29
29
Original file line number Diff line number Diff line change @@ -21,15 +21,15 @@ import com.example.jetcaster.core.data.database.model.Episode
21
21
import com.example.jetcaster.core.data.database.model.EpisodeToPodcast
22
22
import com.example.jetcaster.core.data.database.model.Podcast
23
23
import com.example.jetcaster.core.data.database.model.PodcastWithExtraInfo
24
+ import com.example.jetcaster.core.data.testing.repository.TestCategoryStore
24
25
import com.example.jetcaster.core.model.asExternalModel
25
26
import com.example.jetcaster.core.model.asPodcastToEpisodeInfo
26
- import com.example.jetcaster.core.repository.TestCategoryStore
27
- import java.time.OffsetDateTime
28
27
import kotlinx.coroutines.flow.first
29
28
import kotlinx.coroutines.test.runTest
30
29
import org.junit.Assert.assertEquals
31
30
import org.junit.Assert.assertTrue
32
31
import org.junit.Test
32
+ import java.time.OffsetDateTime
33
33
34
34
class PodcastCategoryFilterUseCaseTest {
35
35
Original file line number Diff line number Diff line change @@ -45,3 +45,4 @@ include(
45
45
" :wear"
46
46
)
47
47
enableFeaturePreview(" TYPESAFE_PROJECT_ACCESSORS" )
48
+ include(" :core:data-testing" )
You can’t perform that action at this time.
0 commit comments