java.lang.Object
org.oxerr.spring.security.otp.samples.helloworld.ApplicationTests
@SpringBootTest
@AutoConfigureMockMvc
class ApplicationTests
extends Object
-
Field Summary
Fields
private org.springframework.test.web.servlet.MockMvc
-
Constructor Summary
Constructors
-
Method Summary
(package private) void
(package private) void
(package private) void
(package private) void
(package private) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
mockMvc
@Autowired
private org.springframework.test.web.servlet.MockMvc mockMvc
-
Constructor Details
-
ApplicationTests
ApplicationTests()
-
Method Details
-
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