-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 changed file
with
9 additions
and
9 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 |
---|---|---|
|
@@ -55,7 +55,7 @@ private void initResource() { | |
} | ||
|
||
@Test | ||
public void testGetResourceTypes() throws Exception { | ||
void testGetResourceTypes() throws Exception { | ||
ActionPattern pattern = new ActionPattern() | ||
.setAuthDomainConstrainable(true) | ||
.setDescription("description") | ||
|
@@ -79,7 +79,7 @@ public void testGetResourceTypes() throws Exception { | |
} | ||
|
||
@Test | ||
public void testPostRegistrationInfo() throws Exception { | ||
void testPostRegistrationInfo() throws Exception { | ||
UserStatus.UserInfo info = new UserStatus.UserInfo().setUserEmail("[email protected]") | ||
.setUserSubjectId("subjectId"); | ||
UserStatus.Enabled enabled = new UserStatus.Enabled().setAllUsersGroup(true).setGoogle(true) | ||
|
@@ -92,7 +92,7 @@ public void testPostRegistrationInfo() throws Exception { | |
} | ||
|
||
@Test | ||
public void testGetSelfDiagnostics() throws Exception { | ||
void testGetSelfDiagnostics() throws Exception { | ||
UserStatusDiagnostics diagnostics = new UserStatusDiagnostics() | ||
.setAdminEnabled(RandomUtils.nextBoolean()) | ||
.setEnabled(RandomUtils.nextBoolean()) | ||
|
@@ -106,7 +106,7 @@ public void testGetSelfDiagnostics() throws Exception { | |
} | ||
|
||
@Test | ||
public void testGetRegistrationInfo() throws Exception { | ||
void testGetRegistrationInfo() throws Exception { | ||
UserStatusInfo userInfo = new UserStatusInfo() | ||
.setAdminEnabled(RandomUtils.nextBoolean()) | ||
.setUserEmail("[email protected]") | ||
|
@@ -119,15 +119,15 @@ public void testGetRegistrationInfo() throws Exception { | |
} | ||
|
||
@Test | ||
public void testPostSelfTos() throws Exception { | ||
void testPostSelfTos() throws Exception { | ||
when(samService.postTosAcceptedStatus(any())).thenReturn(200); | ||
initResource(); | ||
Response response = resource.postSelfTos(authUser); | ||
assertEquals(HttpStatusCodes.STATUS_CODE_OK, response.getStatus()); | ||
} | ||
|
||
@Test | ||
public void testPostSelfTos_NoConsentUser() throws Exception { | ||
void testPostSelfTos_NoConsentUser() throws Exception { | ||
doThrow(new NotFoundException()).when(userService).findUserByEmail(any()); | ||
when(samService.postTosAcceptedStatus(any())).thenReturn(200); | ||
initResource(); | ||
|
@@ -138,17 +138,17 @@ public void testPostSelfTos_NoConsentUser() throws Exception { | |
} | ||
|
||
@Test | ||
public void testPostSelfTos_ExistingSamUser() throws Exception { | ||
void testPostSelfTos_ExistingSamUser() throws Exception { | ||
doThrow(new ConsentConflictException()).when(samService).postRegistrationInfo(any()); | ||
when(samService.postTosAcceptedStatus(any())).thenReturn(409); | ||
when(samService.postTosAcceptedStatus(any())).thenReturn(200); | ||
initResource(); | ||
|
||
Response response = resource.postSelfTos(authUser); | ||
assertEquals(HttpStatusCodes.STATUS_CODE_OK, response.getStatus()); | ||
} | ||
|
||
@Test | ||
public void testRemoveSelfTos() throws Exception { | ||
void testRemoveSelfTos() throws Exception { | ||
when(samService.removeTosAcceptedStatus(any())).thenReturn(200); | ||
initResource(); | ||
Response response = resource.removeTos(authUser); | ||
|