-
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.
Merge pull request #70 from velocitycareerlabs/VL-6359-dev-to-rc
Vl 6359 dev to rc
- Loading branch information
Showing
5 changed files
with
78 additions
and
4 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
3 changes: 3 additions & 0 deletions
3
VCL/src/test/java/io/velocitycareerlabs/entities/VCLSubmissionTest.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
33 changes: 33 additions & 0 deletions
33
VCL/src/test/java/io/velocitycareerlabs/entities/VCLTokenTest.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,33 @@ | ||
/** | ||
* Created by Michael Avoyan on 24/12/2023. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package io.velocitycareerlabs.entities | ||
|
||
import io.velocitycareerlabs.api.entities.VCLToken | ||
import io.velocitycareerlabs.infrastructure.resources.valid.TokenMocks | ||
import org.junit.Test | ||
|
||
class VCLTokenTest { | ||
lateinit var subject: VCLToken | ||
|
||
@Test | ||
fun testToken1() { | ||
subject = VCLToken(value = TokenMocks.TokenStr) | ||
|
||
assert(subject.value == TokenMocks.TokenStr) | ||
assert(subject.jwtValue.encodedJwt == TokenMocks.TokenStr) | ||
assert(subject.expiresIn == 1704020514L) | ||
} | ||
|
||
@Test | ||
fun testToken2() { | ||
subject = VCLToken(jwtValue = TokenMocks.TokenJwt) | ||
|
||
assert(subject.value == TokenMocks.TokenJwt.encodedJwt) | ||
assert(subject.jwtValue.encodedJwt == TokenMocks.TokenJwt.encodedJwt) | ||
assert(subject.expiresIn == 1704020514L) | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
VCL/src/test/java/io/velocitycareerlabs/infrastructure/resources/valid/TokenMocks.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,17 @@ | ||
/** | ||
* Created by Michael Avoyan on 24/12/2023. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package io.velocitycareerlabs.infrastructure.resources.valid | ||
|
||
import io.velocitycareerlabs.api.entities.VCLJwt | ||
|
||
class TokenMocks { | ||
companion object { | ||
const val TokenStr = | ||
"eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJqdGkiOiI2NTg4MGY5ZThkMjY3NWE0NTBhZDVhYjgiLCJpc3MiOiJkaWQ6aW9uOkVpQXBNTGRNYjROUGI4c2FlOS1oWEdIUDc5VzFnaXNBcFZTRTgwVVNQRWJ0SkEiLCJhdWQiOiJkaWQ6aW9uOkVpQXBNTGRNYjROUGI4c2FlOS1oWEdIUDc5VzFnaXNBcFZTRTgwVVNQRWJ0SkEiLCJleHAiOjE3MDQwMjA1MTQsInN1YiI6IjYzODZmODI0ZTc3NDc4OWM0MDNjOTZhMCIsImlhdCI6MTcwMzQxNTcxNH0.AJwKvQ_YNviFTjcuoJUR7ZHFEIbKY9zLCJv4DfC_PPk3Q-15rwKucYy8GdlfKnHLioBA5X37lpG-js8EztEKDg" | ||
val TokenJwt = VCLJwt(encodedJwt = TokenMocks.TokenStr) | ||
} | ||
} |