-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...-messaging/src/androidInstrumentedTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
firebase-messaging/src/commonTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
firebase-messaging/src/iosTest/kotlin/dev/gitlive/firebase/messaging/messaging.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package dev.gitlive.firebase.messaging | ||
|
||
class IOSFirebaseMessagingTest : FirebaseMessagingTest() |