-
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 status checks…
Change tests from Groovy/Spock into Java/Junit
1 parent
346ecac
commit 531c4e8
Showing
14 changed files
with
339 additions
and
215 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
21 changes: 0 additions & 21 deletions
21
src/test/groovy/no/fint/oauth/OAuthConfigJsonIntegrationSpec.groovy
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
src/test/groovy/no/fint/oauth/OAuthConfigPropertyIntegrationSpec.groovy
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/test/groovy/no/fint/oauth/OAuthRestTemplateFactorySpec.groovy
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
src/test/groovy/no/fint/oauth/TokenServiceIntegrationSpec.groovy
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/test/groovy/no/fint/oauth/testutils/TestApplication.java
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,25 @@ | ||
package no.fint.oauth; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
public class AuthTokenTest { | ||
|
||
@Test | ||
public void testAuthTokenCreation() { | ||
String accessToken = "sampleAccessToken"; | ||
String tokenType = "Bearer"; | ||
int expiresIn = 3600; | ||
String acr = "Level4"; | ||
String scope = "read write"; | ||
|
||
AuthToken authToken = new AuthToken(accessToken, tokenType, expiresIn, acr, scope); | ||
|
||
assertNotNull(authToken); | ||
assertEquals(accessToken, authToken.accessToken()); | ||
assertEquals(tokenType, authToken.tokenType()); | ||
assertEquals(expiresIn, authToken.expiresIn()); | ||
assertEquals(acr, authToken.acr()); | ||
assertEquals(scope, authToken.scope()); | ||
} | ||
} |
Oops, something went wrong.