File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ import android.app.Application
2
+ import com.google.firebase.Firebase
3
+ import com.google.firebase.FirebaseOptions
4
+ import com.google.firebase.FirebasePlatform
5
+ import com.google.firebase.initialize
6
+ import org.junit.Test
7
+
8
+
9
+ class AppTest {
10
+ @Test
11
+ fun testInitialize () {
12
+ FirebasePlatform .initializeFirebasePlatform(object : FirebasePlatform () {
13
+ val storage = mutableMapOf<String , String >()
14
+ override fun store (key : String , value : String ) = storage.set(key, value)
15
+ override fun retrieve (key : String ) = storage[key]
16
+ override fun clear (key : String ) { storage.remove(key) }
17
+ override fun log (msg : String ) = println (msg)
18
+ })
19
+ val options = FirebaseOptions .Builder ()
20
+ .setProjectId(" my-firebase-project" )
21
+ .setApplicationId(" 1:27992087142:android:ce3b6448250083d1" )
22
+ .setApiKey(" AIzaSyADUe90ULnQDuGShD9W23RDP0xmeDc6Mvw" )
23
+ // setDatabaseURL(...)
24
+ // setStorageBucket(...)
25
+ .build()
26
+ val app = Firebase .initialize(Application (), options)
27
+
28
+ }
29
+ }
You can’t perform that action at this time.
0 commit comments