Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #90 from iden3/feature/android
Browse files Browse the repository at this point in the history
Feature/android
  • Loading branch information
rauljareno authored Apr 3, 2020
2 parents 02a51a6 + 8cb1c3e commit aa2242b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions android/iden3coreapi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ android {
consumerProguardFiles 'consumer-rules.pro'
}

testOptions {
unitTests.includeAndroidResources = true
}

buildTypes {
release {
minifyEnabled false
Expand Down Expand Up @@ -43,7 +47,12 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'com.iden3:iden3mobile:v0.0.1-beta4'
// Required -- JUnit 4 framework
testImplementation 'junit:junit:4.13'
// Optional -- Robolectric environment
testImplementation 'androidx.test:core:1.2.0'
// Optional -- Mockito framework
testImplementation 'org.mockito:mockito-core:2.7.21'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
package com.iden3.iden3coreapi

import android.content.Context
import org.junit.Test

import org.junit.Assert.*
import androidx.test.core.app.ApplicationProvider

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
val context = ApplicationProvider.getApplicationContext<Context>()

@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}

@Test
fun testIden3CoreAPI() {
val iden3CoreAPI = Iden3CoreAPI.instance
assertTrue(iden3CoreAPI != null)
}
}

0 comments on commit aa2242b

Please sign in to comment.