Class ApplicationTests


  • @SpringBootTest
    @AutoConfigureMockMvc
    class ApplicationTests
    extends Object
    • Field Detail

      • mockMvc

        @Autowired
        private org.springframework.test.web.servlet.MockMvc mockMvc
    • Constructor Detail

      • ApplicationTests

        ApplicationTests()
    • Method Detail

      • loginWithValidUserThenAuthenticated

        @Test
        void loginWithValidUserThenAuthenticated()
                                          throws Exception
        Throws:
        Exception
      • loginWithInvalidUserThenUnauthenticated

        @Test
        void loginWithInvalidUserThenUnauthenticated()
                                              throws Exception
        Throws:
        Exception
      • accessUnsecuredResourceThenOk

        @Test
        void accessUnsecuredResourceThenOk()
                                    throws Exception
        Throws:
        Exception
      • accessSecuredResourceUnauthenticatedThenRedirectsToLogin

        @Test
        void accessSecuredResourceUnauthenticatedThenRedirectsToLogin()
                                                               throws Exception
        Throws:
        Exception
      • accessSecuredResourceAuthenticatedThenOk

        @Test
        @WithMockUser
        void accessSecuredResourceAuthenticatedThenOk()
                                               throws Exception
        Throws:
        Exception