Skip to content

Commit

Permalink
PUB-2681 - Fixed PMD issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisS1512 committed Dec 13, 2024
1 parent 180b67b commit 0cfd0a1
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class AccountTest {
private static final String FORBIDDEN_STATUS_CODE = "Status code does not match forbidden";
private static final String DELETE_USER_FAILURE = "Failed to delete user account";
private static final String DELETE_USER_SUCCESS = "User deleted";
private static final String ADD_USERS_SCRIPT = "classpath:add-admin-users.sql";

private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();

Expand Down Expand Up @@ -610,7 +611,7 @@ void testDeleteAccountNotFound() throws Exception {
}

@Test
@Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, scripts = "classpath:add-admin-users.sql")
@Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, scripts = ADD_USERS_SCRIPT)
void testV2SystemAdminDeletesVerifiedUser() throws Exception {
validUser.setUserProvenance(UserProvenances.CFT_IDAM);
validUser.setRoles(Roles.VERIFIED);
Expand Down Expand Up @@ -644,7 +645,7 @@ void testV2SystemAdminDeletesVerifiedUser() throws Exception {
}

@Test
@Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, scripts = "classpath:add-admin-users.sql")
@Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, scripts = ADD_USERS_SCRIPT)
void testV2SystemAdminDeletesThirdPartyUser() throws Exception {

PiUser thirdPartyUser = createThirdPartyUser();
Expand Down Expand Up @@ -676,7 +677,7 @@ void testV2SystemAdminDeletesThirdPartyUser() throws Exception {
}

@Test
@Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, scripts = "classpath:add-admin-users.sql")
@Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, scripts = ADD_USERS_SCRIPT)
void testV2SystemAdminDeletesSuperAdminUser() throws Exception {
superAdminUser.setUserProvenance(UserProvenances.CFT_IDAM);
String superAdminUserId = getSuperAdminUserId(superAdminUser);
Expand Down Expand Up @@ -897,7 +898,7 @@ void testUpdateAccountRoleByIdNotFound() throws Exception {
}

@Test
@Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, scripts = "classpath:add-admin-users.sql")
@Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, scripts = ADD_USERS_SCRIPT)
void testCreateThirdPartyUser() throws Exception {
PiUser thirdPartyUser = createThirdPartyUser();
MockHttpServletRequestBuilder mockHttpServletRequestBuilder = MockMvcRequestBuilders
Expand All @@ -920,7 +921,7 @@ void testCreateThirdPartyUser() throws Exception {
}

@Test
@Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, scripts = "classpath:add-admin-users.sql")
@Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, scripts = ADD_USERS_SCRIPT)
void testUnauthorizedCreateThirdPartyUser() throws Exception {
PiUser thirdPartyUser = createUser(true, Roles.GENERAL_THIRD_PARTY);
MockHttpServletRequestBuilder mockHttpServletRequestBuilder = MockMvcRequestBuilders
Expand Down

0 comments on commit 0cfd0a1

Please sign in to comment.