diff options
author | William Harrington <kb0iic@berzerkula.org> | 2025-02-12 20:21:11 -0600 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2025-02-12 20:21:11 -0600 |
commit | d4708d14a4e739d835ae75885c4f323d23e65c58 (patch) | |
tree | 7b235d29396e8a36fe02faf94641f4cab4ab713c | |
parent | 2908dc790f55644b26c1bb7398372d08ff4feef7 (diff) |
Rename test class and remove public modifiers.
-rw-r--r-- | src/test/java/org/berzerkula/builddb/controllers/BuilddbAccountControllerTest.java (renamed from src/test/java/org/berzerkula/builddb/controllers/BuilddbTestAccountController.java) | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/java/org/berzerkula/builddb/controllers/BuilddbTestAccountController.java b/src/test/java/org/berzerkula/builddb/controllers/BuilddbAccountControllerTest.java index 50548fd..a1ab349 100644 --- a/src/test/java/org/berzerkula/builddb/controllers/BuilddbTestAccountController.java +++ b/src/test/java/org/berzerkula/builddb/controllers/BuilddbAccountControllerTest.java @@ -25,7 +25,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @AutoConfigureMockMvc @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class BuilddbTestAccountController { +class BuilddbAccountControllerTest { @Autowired private AppUserRepository appUserRepository; @@ -34,7 +34,7 @@ public class BuilddbTestAccountController { private MockMvc mockMvc; @Test - public void shouldReturnIndexOk() throws Exception { + void shouldReturnIndexOk() throws Exception { mockMvc.perform(get("/")) .andExpect(status().isOk()) .andExpect(view().name("index")) @@ -42,7 +42,7 @@ public class BuilddbTestAccountController { } @Test - public void shouldReturnLoginOk() throws Exception { + void shouldReturnLoginOk() throws Exception { mockMvc.perform(get("/login")) .andExpect(status().isOk()) .andExpect(view().name("login")) @@ -50,7 +50,7 @@ public class BuilddbTestAccountController { } @Test - public void shouldProfileRedirectToLogin() throws Exception { + void shouldProfileRedirectToLogin() throws Exception { mockMvc.perform(get("/profile")) .andExpect(status().is3xxRedirection()) .andDo(print()); @@ -58,7 +58,7 @@ public class BuilddbTestAccountController { @WithMockUser(roles="client") @Test - public void shouldReturnProfileView() throws Exception { + void shouldReturnProfileView() throws Exception { AppUser appUser = new AppUser(); appUser.setFirstName("John"); @@ -79,7 +79,7 @@ public class BuilddbTestAccountController { } @Test - public void shouldReturnRegisterOk() throws Exception { + void shouldReturnRegisterOk() throws Exception { mockMvc.perform(get("/register")) .andExpect(status().isOk()) .andExpect(view().name("register")) @@ -87,7 +87,7 @@ public class BuilddbTestAccountController { } @Test - public void shouldRegisterRequiredValidationError() throws Exception { + void shouldRegisterRequiredValidationError() throws Exception { mockMvc.perform(post("/register") .with(csrf()) .formField("firstName", "") @@ -103,7 +103,7 @@ public class BuilddbTestAccountController { } @Test - public void shouldRegisterPasswordValidationError() throws Exception { + void shouldRegisterPasswordValidationError() throws Exception { mockMvc.perform(post("/register") .with(csrf()) .formField("firstName", "John") @@ -119,7 +119,7 @@ public class BuilddbTestAccountController { } @Test - public void shouldRegisterSuccess() throws Exception { + void shouldRegisterSuccess() throws Exception { mockMvc.perform(post("/register") .with(csrf()) .formField("firstName", "John") |