Constructor and Description |
---|
MockMvcConfig()
Creates a default
MockMvcConfig that automatically applies the SecurityMockMvcConfigurer if available in classpath. |
Modifier and Type | Method and Description |
---|---|
MockMvcConfig |
automaticallyApplySpringSecurityMockMvcConfigurer()
Instruct REST Assured Mock Mvc to automatically apply the SpringSecurityMockMvcConfigurer if it's available in the classpath.
|
MockMvcConfig |
automaticallyApplySpringSecurityMockMvcConfigurer(boolean shouldAutomaticallyApplySpringSecurityMockMvcConfigurer)
Instructs REST Assured to automatically apply the SecurityMockMvcConfigurer that allows for Spring Security testing.
|
MockMvcConfig |
dontAutomaticallyApplySpringSecurityMockMvcConfigurer()
Instruct REST Assured Mock Mvc not to automatically apply the SpringSecurityMockMvcConfigurer even if it's available in the classpath.
|
boolean |
isUserConfigured() |
static MockMvcConfig |
mockMvcConfig()
Just syntactic sugar.
|
boolean |
shouldAutomaticallyApplySpringSecurityMockMvcConfigurer() |
MockMvcConfig |
with()
Just syntactic sugar to make the DSL more english like.
|
public MockMvcConfig()
MockMvcConfig
that automatically applies the SecurityMockMvcConfigurer
if available in classpath.public MockMvcConfig dontAutomaticallyApplySpringSecurityMockMvcConfigurer()
public MockMvcConfig automaticallyApplySpringSecurityMockMvcConfigurer(boolean shouldAutomaticallyApplySpringSecurityMockMvcConfigurer)
spring-security-test
is in the classpath and you've configured Rest Assured Mock MVC an instance of AbstractMockMvcBuilder
.
For example by using MockMvcRequestSpecification.webAppContextSetup(WebApplicationContext, MockMvcConfigurer...)
or
MockMvcRequestSpecification.standaloneSetup(MockMvcBuilder)
.shouldAutomaticallyApplySpringSecurityMockMvcConfigurer
- true
if SecurityMockMvcConfigurer should be automatically applied if available in classpath, false
otherwise.MockMvcConfig
.public MockMvcConfig automaticallyApplySpringSecurityMockMvcConfigurer()
MockMvcConfig
.automaticallyApplySpringSecurityMockMvcConfigurer(boolean)
public boolean shouldAutomaticallyApplySpringSecurityMockMvcConfigurer()
public boolean isUserConfigured()
isUserConfigured
in interface Config
public MockMvcConfig with()
public static MockMvcConfig mockMvcConfig()
MockMvcConfig
.Copyright © 2010–2015. All rights reserved.