-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
1e8ef56
commit feb5f26
Showing
4 changed files
with
48 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [ GroupeMINASTE, NathanFallet, PlugNPush, JohnPoliakov ] |
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,21 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up our JDK environment | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 19 | ||
- name: Install dependencies and run tests | ||
run: ./gradlew test koverXmlReport | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 |
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
19 changes: 19 additions & 0 deletions
19
...ed/src/androidUnitTest/kotlin/me/nathanfallet/extopy/usecases/auth/GetTokenUseCaseTest.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,19 @@ | ||
package me.nathanfallet.extopy.usecases.auth | ||
|
||
import io.mockk.every | ||
import io.mockk.mockk | ||
import me.nathanfallet.extopy.repositories.application.ITokenRepository | ||
import kotlin.test.Test | ||
import kotlin.test.assertEquals | ||
|
||
class GetTokenUseCaseTest { | ||
|
||
@Test | ||
fun invoke() { | ||
val tokenRepository = mockk<ITokenRepository>() | ||
val useCase = GetTokenUseCase(tokenRepository) | ||
every { tokenRepository.getToken() }.returns("token") | ||
assertEquals("token", useCase()) | ||
} | ||
|
||
} |