Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust PlayLog test setup #2

Merged
merged 10 commits into from
May 29, 2024
9 changes: 9 additions & 0 deletions player/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ plugins {

android {
namespace = "com.tidal.sdk.player"

sourceSets {
getByName("androidTest").java
.srcDirs(
"events/src/androidTest/kotlin",
"events/src/testext/kotlin",
)
}
}

dependencies {
Expand Down Expand Up @@ -39,4 +47,5 @@ dependencies {
androidTestImplementation(project(":player:testutil"))
androidTestImplementation(libs.test.mockito.kotlin)
androidTestImplementation(libs.test.mockito.android)
androidTestImplementation(libs.kotlinx.coroutines.test)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.tidal.sdk.player.events.playlogtest

import android.content.Context
import android.net.ConnectivityManager
import com.google.gson.Gson
import com.tidal.sdk.eventproducer.EventSender
import com.tidal.sdk.player.common.UUIDWrapper
import com.tidal.sdk.player.commonandroid.TrueTimeWrapper
import com.tidal.sdk.player.events.ClientSupplier
import com.tidal.sdk.player.events.UserSupplier
import com.tidal.sdk.player.events.di.DaggerDefaultEventReporterComponent
import com.tidal.sdk.player.events.di.DefaultEventReporterComponent
import kotlinx.coroutines.CoroutineScope
import okhttp3.OkHttpClient

class PlayLogTestDefaultEventReporterComponentFactory(
private val coroutineScopeOverride: CoroutineScope,
) : DefaultEventReporterComponent.Factory {
override fun create(
context: Context,
connectivityManager: ConnectivityManager,
userSupplier: UserSupplier,
clientSupplier: ClientSupplier,
okHttpClient: OkHttpClient,
gson: Gson,
uuidWrapper: UUIDWrapper,
trueTimeWrapper: TrueTimeWrapper,
eventSender: EventSender,
coroutineScope: CoroutineScope,
) = DaggerDefaultEventReporterComponent.factory()
.create(
context,
connectivityManager,
userSupplier,
clientSupplier,
okHttpClient,
gson,
uuidWrapper,
trueTimeWrapper,
eventSender,
coroutineScopeOverride,
)
}
142 changes: 0 additions & 142 deletions player/src/androidTest/kotlin/com/tidal/sdk/player/PlayerPlayTest.kt

This file was deleted.

Loading
Loading