This repository has been archived by the owner on Feb 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
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
107 changed files
with
2,839 additions
and
659 deletions.
There are no files selected for viewing
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
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,30 @@ | ||
#### Guidlines for writing User Stories and Pull Requests | ||
This is the first draft of this documents which be continuous revised. | ||
|
||
# User Stories: | ||
#### Goal | ||
|
||
This should be 1 - 2 sentences max and should clearly state what the User Story ie expected to achieve. A user story should have just one goal | ||
|
||
#### Description | ||
|
||
This should specify any important steps which needed to achieve the above goal. Important technical information such as specific steps, sample data, user experience considerations, etc should go into the description | ||
|
||
#### Acceptance Criteria | ||
|
||
Each story must have a minimum 2 and a maximum of 5 acceptance criteria. These are conditions which can be verified by the test engineer and must be met for the task to be seen as completed. | ||
|
||
#### Test Cases | ||
|
||
A User Story should have at least one test case. This is a scenario or example which can validates the acceptance criteria above | ||
|
||
|
||
# Pull Requests: | ||
|
||
Every PR should have: | ||
|
||
1. Brief explanation of what was actually done | ||
2. Screenshots if applicable | ||
3. Unit tests for new code | ||
4. Testing instructions in PR description | ||
5. Comments (dokka, javadoc) for new methods |
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
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
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,22 @@ | ||
package me.uport.sdk.core | ||
|
||
/** | ||
* An interface for getting "current" timestamp. | ||
* | ||
* The default implementation is [SystemTimeProvider] but other implementations may be used during testing and for "was valid at" scenarios. | ||
*/ | ||
interface ITimeProvider { | ||
/** | ||
* Returns the current timestamp in milliseconds | ||
* @return the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. | ||
*/ | ||
fun now() : Long | ||
} | ||
|
||
|
||
/** | ||
* Default time provider | ||
*/ | ||
object SystemTimeProvider : ITimeProvider { | ||
override fun now() = System.currentTimeMillis() | ||
} |
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
package me.uport.sdk.core | ||
|
||
import org.junit.Assert.assertTrue | ||
import org.junit.Test | ||
|
||
class TimeProviderTest { | ||
|
||
@Test | ||
fun `default provider is close to current time`() { | ||
val systemTime = System.currentTimeMillis() | ||
val defaultProvider = SystemTimeProvider | ||
//some systems have tens of milliseconds as the lowest granularity | ||
assertTrue(defaultProvider.now() - systemTime < 100L) | ||
} | ||
} |
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,58 @@ | ||
apply plugin: "com.android.library" | ||
apply plugin: "kotlin-android" | ||
apply plugin: "kotlinx-serialization" | ||
apply plugin: "maven" | ||
|
||
//apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle' | ||
|
||
android { | ||
compileSdkVersion compile_sdk_version | ||
buildToolsVersion build_tools_version | ||
|
||
|
||
defaultConfig { | ||
minSdkVersion min_sdk_version | ||
targetSdkVersion target_sdk_version | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
multiDexEnabled true | ||
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
|
||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
dexOptions { | ||
jumboMode true | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" | ||
|
||
api project(":serialization") | ||
api project(":jwt") | ||
api project(":universal-did") | ||
api project(":signer") | ||
|
||
implementation "com.android.support:support-annotations:$support_lib_version" | ||
|
||
testImplementation "junit:junit:$junit_version" | ||
testImplementation "org.mockito:mockito-inline:$mockito_version" | ||
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$mockito_kotlin_version" | ||
} | ||
|
||
kotlin { | ||
experimental { | ||
coroutines "enable" | ||
} | ||
} |
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,5 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="me.uport.sdk.credentials"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
</manifest> |
Oops, something went wrong.