Add Android Project

This commit is contained in:
GuilhermeWerner 2021-05-23 15:13:50 -03:00
parent 83feb942ab
commit 0b027bebb4
22 changed files with 271 additions and 97 deletions

View file

@ -0,0 +1,24 @@
// Copyright (c) TribuFu. All Rights Reserved
package com.tribufu.sdk.android
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.*
import org.junit.Test
import org.junit.runner.RunWith
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.tribufu.sdk.android.test", appContext.packageName)
}
}

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.tribufu.sdk.android"></manifest>

View file

@ -0,0 +1,5 @@
// Copyright (c) TribuFu. All Rights Reserved
package com.tribufu.sdk.android
class TribuFu {}

View file

@ -0,0 +1,18 @@
// Copyright (c) TribuFu. All Rights Reserved
package com.tribufu.sdk.android
import org.junit.Assert.*
import org.junit.Test
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}