diff --git a/firebase-messaging/src/androidInstrumentedTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt b/firebase-messaging/src/androidInstrumentedTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt new file mode 100644 index 000000000..059bf03d6 --- /dev/null +++ b/firebase-messaging/src/androidInstrumentedTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt @@ -0,0 +1,28 @@ +package dev.gitlive.firebase.messaging + +import androidx.test.platform.app.InstrumentationRegistry +import dev.gitlive.firebase.Firebase +import dev.gitlive.firebase.FirebaseOptions +import dev.gitlive.firebase.apps +import dev.gitlive.firebase.initialize +import kotlin.test.BeforeTest + +class AndroidInstrumentedFirebaseMessagingTest : FirebaseMessagingTest() { + + private val context = InstrumentationRegistry.getInstrumentation().context + + @BeforeTest + fun initializeFirebase() { + Firebase.apps(context).firstOrNull() ?: Firebase.initialize( + context, + FirebaseOptions( + applicationId = "1:846484016111:ios:dd1f6688bad7af768c841a", + apiKey = "AIzaSyCK87dcMFhzCz_kJVs2cT2AVlqOTLuyWV0", + databaseUrl = "https://fir-kotlin-sdk.firebaseio.com", + storageBucket = "fir-kotlin-sdk.appspot.com", + projectId = "fir-kotlin-sdk", + gcmSenderId = "846484016111" + ) + ) + } +} \ No newline at end of file diff --git a/firebase-messaging/src/commonTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt b/firebase-messaging/src/commonTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt new file mode 100644 index 000000000..e29682ee6 --- /dev/null +++ b/firebase-messaging/src/commonTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt @@ -0,0 +1,13 @@ +package dev.gitlive.firebase.messaging + +import dev.gitlive.firebase.Firebase +import kotlin.test.Test +import kotlin.test.assertNotNull + +abstract class FirebaseMessagingTest { + + @Test + fun initialization() { + assertNotNull(Firebase.messaging) + } +} \ No newline at end of file diff --git a/firebase-messaging/src/iosTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt b/firebase-messaging/src/iosTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt new file mode 100644 index 000000000..3501ed370 --- /dev/null +++ b/firebase-messaging/src/iosTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt @@ -0,0 +1,3 @@ +package dev.gitlive.firebase.messaging + +class IOSFirebaseMessagingTest : FirebaseMessagingTest() \ No newline at end of file