forked from paulkokos/discountFinderAndroid
-
Notifications
You must be signed in to change notification settings - Fork 3
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
5 changed files
with
41 additions
and
90 deletions.
There are no files selected for viewing
52 changes: 0 additions & 52 deletions
52
...src/main/java/eu/jnksoftware/discountfinderandroid/models/token/RegisterTokenRequest.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
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 |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
import java.io.IOException; | ||
|
||
|
||
import eu.jnksoftware.discountfinderandroid.models.token.RegisterTokenRequest; | ||
import eu.jnksoftware.discountfinderandroid.models.token.User; | ||
import eu.jnksoftware.discountfinderandroid.services.IuserService; | ||
|
||
|
@@ -21,13 +20,13 @@ public void testTokenType() throws IOException | |
|
||
{ | ||
IuserService s = ApiUtils.getMockUserService(); | ||
RegisterTokenRequest registerTokenRequest=new RegisterTokenRequest(); | ||
registerTokenRequest.setLastName("Delis"); | ||
registerTokenRequest.setFirstName("Nikos"); | ||
registerTokenRequest.setEMail("[email protected]"); | ||
registerTokenRequest.setPassword("123455"); | ||
String email="[email protected]"; | ||
String fname="nikos"; | ||
String lname="delis"; | ||
String pass="123456"; | ||
|
||
User user = s.register(registerTokenRequest).execute().body(); | ||
|
||
User user = s.register(fname,lname,email,pass).execute().body(); | ||
assertEquals("Bearer", user.getTokenType()); | ||
|
||
} | ||
|
@@ -36,13 +35,13 @@ public void testTokenAccess() throws IOException | |
|
||
{ | ||
IuserService s = ApiUtils.getMockUserService(); | ||
RegisterTokenRequest registerTokenRequest=new RegisterTokenRequest(); | ||
registerTokenRequest.setLastName("Delis"); | ||
registerTokenRequest.setFirstName("Nikos"); | ||
registerTokenRequest.setEMail("[email protected]"); | ||
registerTokenRequest.setPassword("123455"); | ||
String email="[email protected]"; | ||
String fname="nikos"; | ||
String lname="delis"; | ||
String pass="123456"; | ||
|
||
|
||
User user = s.register(registerTokenRequest).execute().body(); | ||
User user = s.register(fname,lname,email,pass).execute().body(); | ||
assertEquals("mock_access", user.getAccessToken().toString()); | ||
|
||
} | ||
|
@@ -51,13 +50,13 @@ public void testTokenRefresh() throws IOException | |
|
||
{ | ||
IuserService s = ApiUtils.getMockUserService(); | ||
RegisterTokenRequest registerTokenRequest=new RegisterTokenRequest(); | ||
registerTokenRequest.setLastName("Delis"); | ||
registerTokenRequest.setFirstName("Nikos"); | ||
registerTokenRequest.setEMail("[email protected]"); | ||
registerTokenRequest.setPassword("123455"); | ||
String email="[email protected]"; | ||
String fname="nikos"; | ||
String lname="delis"; | ||
String pass="123456"; | ||
|
||
User user = s.register(registerTokenRequest).execute().body(); | ||
|
||
User user = s.register(fname,lname,email,pass).execute().body(); | ||
assertEquals("mock_refresh", user.getRefreshToken().toString()); | ||
|
||
} | ||
|
@@ -66,13 +65,13 @@ public void testExpiresIn() throws IOException | |
|
||
{ | ||
IuserService s = ApiUtils.getMockUserService(); | ||
RegisterTokenRequest registerTokenRequest=new RegisterTokenRequest(); | ||
registerTokenRequest.setLastName("Delis"); | ||
registerTokenRequest.setFirstName("Nikos"); | ||
registerTokenRequest.setEMail("[email protected]"); | ||
registerTokenRequest.setPassword("123455"); | ||
String email="[email protected]"; | ||
String fname="nikos"; | ||
String lname="delis"; | ||
String pass="123456"; | ||
|
||
|
||
User user = s.register(registerTokenRequest).execute().body(); | ||
User user = s.register(fname,lname,email,pass).execute().body(); | ||
assertEquals("7199", user.getExpiresIn().toString()); | ||
|
||
} | ||
|