Index
All Classes and Interfaces|All Packages|Serialized Form
A
- AbstractApplicationContextRunner<SELF extends AbstractApplicationContextRunner<SELF,
C, A>, C extends org.springframework.context.ConfigurableApplicationContext, A extends ApplicationContextAssertProvider<C>> - Class in org.springframework.boot.test.context.runner -
Utility design to run an
ApplicationContextand provide AssertJ style assertions. - AbstractApplicationContextRunner(Function<AbstractApplicationContextRunner.RunnerConfiguration<C>, SELF>, Supplier<C>, Class<?>...) - Constructor for class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Create a new
AbstractApplicationContextRunnerinstance. - AbstractApplicationContextRunner(Supplier<C>, Function<AbstractApplicationContextRunner.RunnerConfiguration<C>, SELF>) - Constructor for class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Deprecated, for removal: This API element is subject to removal in a future version.
- AbstractApplicationContextRunner(AbstractApplicationContextRunner.RunnerConfiguration<C>, Function<AbstractApplicationContextRunner.RunnerConfiguration<C>, SELF>) - Constructor for class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Create a new
AbstractApplicationContextRunnerinstance. - AbstractApplicationContextRunner.BeanRegistration<T> - Class in org.springframework.boot.test.context.runner
-
A Bean registration to be applied when the context loaded.
- AbstractApplicationContextRunner.RunnerConfiguration<C extends org.springframework.context.ConfigurableApplicationContext> - Class in org.springframework.boot.test.context.runner
- AbstractJsonMarshalTester<T> - Class in org.springframework.boot.test.json
-
Base class for AssertJ based JSON marshal testers.
- AbstractJsonMarshalTester() - Constructor for class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Create a new uninitialized
AbstractJsonMarshalTesterinstance. - AbstractJsonMarshalTester(Class<?>, ResolvableType) - Constructor for class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Create a new
AbstractJsonMarshalTesterinstance. - AbstractJsonMarshalTester.FieldInitializer<M> - Class in org.springframework.boot.test.json
-
Utility class used to support field initialization.
- accept(C) - Method in interface org.springframework.boot.test.context.runner.ContextConsumer
-
Performs this operation on the supplied
context. - addTo(Map<String, Object>) - Method in class org.springframework.boot.test.util.TestPropertyValues.Pair
- after() - Static method in enum class org.springframework.boot.test.mock.mockito.MockReset
-
Deprecated.Create
settingsto be used with mocks where reset should occur after each test method runs. - AFTER - Enum constant in enum class org.springframework.boot.test.mock.mockito.MockReset
-
Deprecated.Reset the mock after the test method runs.
- afterAll(ExtensionContext) - Method in class org.springframework.boot.test.system.OutputCaptureExtension
- afterEach(ExtensionContext) - Method in class org.springframework.boot.test.system.OutputCaptureExtension
- afterTestClass(TestContext) - Method in class org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener
-
Deprecated.
- afterTestMethod(TestContext) - Method in class org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener
-
Deprecated.
- afterTestMethod(TestContext) - Method in class org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener
-
Deprecated.
- ALWAYS - Enum constant in enum class org.springframework.boot.test.context.SpringBootTest.UseMainMethod
-
Always use the
mainmethod. - and(Iterable<String>) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Return a new
TestPropertyValuesinstance with additional entries. - and(String...) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Return a new
TestPropertyValuesinstance with additional entries. - and(Map<String, String>) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Return a new
TestPropertyValuesinstance with additional entries. - and(Stream<String>) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Return a new
TestPropertyValuesinstance with additional entries. - and(Stream<T>, Function<T, TestPropertyValues.Pair>) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Return a new
TestPropertyValuesinstance with additional entries. - andThen(ContextConsumer<? super C>) - Method in interface org.springframework.boot.test.context.runner.ContextConsumer
-
Returns a composed
ContextConsumerthat performs, in sequence, this operation followed by theafteroperation. - AnnotatedClassFinder - Class in org.springframework.boot.test.context
-
Utility class to find a class annotated with a particular annotation in a hierarchy.
- AnnotatedClassFinder(Class<? extends Annotation>) - Constructor for class org.springframework.boot.test.context.AnnotatedClassFinder
-
Create a new instance with the
annotationTypeto find. - answer() - Element in annotation interface org.springframework.boot.test.mock.mockito.MockBean
-
Deprecated.The
Answerstype to use on the mock. - ApplicationContextAssert<C extends org.springframework.context.ApplicationContext> - Class in org.springframework.boot.test.context.assertj
-
AssertJ
assertionsthat can be applied to anApplicationContext. - ApplicationContextAssert.Scope - Enum Class in org.springframework.boot.test.context.assertj
-
The scope of an assertion.
- ApplicationContextAssertProvider<C extends org.springframework.context.ApplicationContext> - Interface in org.springframework.boot.test.context.assertj
-
An
ApplicationContextthat additionally supports AssertJ style assertions. - ApplicationContextRunner - Class in org.springframework.boot.test.context.runner
-
An
ApplicationContext runnerfor a standard, non-web environmentConfigurableApplicationContext. - ApplicationContextRunner() - Constructor for class org.springframework.boot.test.context.runner.ApplicationContextRunner
-
Create a new
ApplicationContextRunnerinstance using anAnnotationConfigApplicationContextas the underlying source. - ApplicationContextRunner(Supplier<ConfigurableApplicationContext>) - Constructor for class org.springframework.boot.test.context.runner.ApplicationContextRunner
-
Create a new
ApplicationContextRunnerinstance using the specifiedcontextFactoryas the underlying source. - ApplicationContextRunner(Supplier<ConfigurableApplicationContext>, Class<?>...) - Constructor for class org.springframework.boot.test.context.runner.ApplicationContextRunner
-
Create a new
ApplicationContextRunnerinstance using the specifiedcontextFactoryas the underlying source. - ApplicationContextTestUtils - Class in org.springframework.boot.test.util
-
Application context related test utilities.
- ApplicationContextTestUtils() - Constructor for class org.springframework.boot.test.util.ApplicationContextTestUtils
- apply(Statement, Description) - Method in class org.springframework.boot.test.system.OutputCaptureRule
- apply(MockReset, MockSettings) - Static method in enum class org.springframework.boot.test.mock.mockito.MockReset
-
Deprecated.Apply
MockResetto existingsettings. - apply(ConfigurableApplicationContext) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner.BeanRegistration
- applySuffix(String) - Method in enum class org.springframework.boot.test.util.TestPropertyValues.Type
- applyTo(ConfigurableApplicationContext) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Add the properties from the underlying map to the environment owned by an
ApplicationContext. - applyTo(ConfigurableEnvironment) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Add the properties from the underlying map to the environment.
- applyTo(ConfigurableEnvironment, TestPropertyValues.Type) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Add the properties from the underlying map to the environment using the specified property source type.
- applyTo(ConfigurableEnvironment, TestPropertyValues.Type, String) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Add the properties from the underlying map to the environment using the specified property source type and name.
- applyToSystemProperties(Runnable) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Add the properties to the
system propertiesfor the duration of theaction, restoring previous values when it completes. - applyToSystemProperties(Callable<T>) - Method in class org.springframework.boot.test.util.TestPropertyValues
-
Add the properties to the
system propertiesfor the duration of thecall, restoring previous values when it completes. - args() - Element in annotation interface org.springframework.boot.test.context.SpringBootTest
-
Application arguments that should be passed to the application under test.
- asArray() - Method in class org.springframework.boot.test.json.ObjectContentAssert
-
Verifies that the actual value is an array, and returns an array assertion, to allow chaining of array-specific assertions from this call.
- asMap() - Method in class org.springframework.boot.test.json.ObjectContentAssert
-
Verifies that the actual value is a map, and returns a map assertion, to allow chaining of map-specific assertions from this call.
- AssertableApplicationContext - Interface in org.springframework.boot.test.context.assertj
-
An
ApplicationContextthat additionally supports AssertJ style assertions. - AssertableReactiveWebApplicationContext - Interface in org.springframework.boot.test.context.assertj
-
A
ReactiveWebApplicationContextthat additionally supports AssertJ style assertions. - AssertableWebApplicationContext - Interface in org.springframework.boot.test.context.assertj
-
A
WebApplicationContextthat additionally supports AssertJ style assertions. - assertThat() - Method in interface org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider
-
Deprecated.to prevent accidental use. Prefer standard AssertJ
assertThat(context)...calls instead. - assertThat() - Method in class org.springframework.boot.test.json.JsonContent
-
Deprecated.to prevent accidental use. Prefer standard AssertJ
assertThat(context)...calls instead. - assertThat() - Method in class org.springframework.boot.test.json.ObjectContent
B
- BasicJsonTester - Class in org.springframework.boot.test.json
-
AssertJ based JSON tester that works with basic JSON strings.
- BasicJsonTester() - Constructor for class org.springframework.boot.test.json.BasicJsonTester
-
Create a new uninitialized
BasicJsonTesterinstance. - BasicJsonTester(Class<?>) - Constructor for class org.springframework.boot.test.json.BasicJsonTester
-
Create a new
BasicJsonTesterinstance that will load resources as UTF-8. - BasicJsonTester(Class<?>, Charset) - Constructor for class org.springframework.boot.test.json.BasicJsonTester
-
Create a new
BasicJsonTesterinstance. - BeanRegistration(String, Class<T>, Object...) - Constructor for class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner.BeanRegistration
- BeanRegistration(String, Class<T>, Supplier<T>, BeanDefinitionCustomizer...) - Constructor for class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner.BeanRegistration
- before() - Static method in enum class org.springframework.boot.test.mock.mockito.MockReset
-
Deprecated.Create
settingsto be used with mocks where reset should occur before each test method runs. - BEFORE - Enum constant in enum class org.springframework.boot.test.mock.mockito.MockReset
-
Deprecated.Reset the mock before the test method runs.
- beforeAll(ExtensionContext) - Method in class org.springframework.boot.test.system.OutputCaptureExtension
- beforeEach(ExtensionContext) - Method in class org.springframework.boot.test.system.OutputCaptureExtension
- beforeTestMethod(TestContext) - Method in class org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener
-
Deprecated.
- beforeTestMethod(TestContext) - Method in class org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener
-
Deprecated.
- bindTo(RestTemplate) - Static method in class org.springframework.boot.test.web.client.RootUriRequestExpectationManager
-
Return a bound
MockRestServiceServerfor the givenRestTemplate, configured withRootUriRequestExpectationManagerwhen possible. - bindTo(RestTemplate, RequestExpectationManager) - Static method in class org.springframework.boot.test.web.client.RootUriRequestExpectationManager
-
Return a bound
MockRestServiceServerfor the givenRestTemplate, configured withRootUriRequestExpectationManagerwhen possible. - buildTestContext() - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
C
- CapturedOutput - Interface in org.springframework.boot.test.system
-
Provides access to
System.outandSystem.erroutput that has been captured by theOutputCaptureExtensionorOutputCaptureRule. - charAt(int) - Method in interface org.springframework.boot.test.system.CapturedOutput
- classes() - Element in annotation interface org.springframework.boot.test.context.SpringBootTest
-
The component classes to use for loading an
ApplicationContext. - classes() - Element in annotation interface org.springframework.boot.test.mock.mockito.MockBean
-
Deprecated.The classes to mock.
- classes() - Element in annotation interface org.springframework.boot.test.mock.mockito.SpyBean
-
Deprecated.The classes to spy.
- close() - Method in interface org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider
- closeAll(ApplicationContext) - Static method in class org.springframework.boot.test.util.ApplicationContextTestUtils
-
Closes this
ApplicationContextand its parent hierarchy if any. - ConfigDataApplicationContextInitializer - Class in org.springframework.boot.test.context
-
ApplicationContextInitializerthat can be used with theContextConfiguration.initializers()to trigger loading ofConfigDatasuch as application.properties. - ConfigDataApplicationContextInitializer() - Constructor for class org.springframework.boot.test.context.ConfigDataApplicationContextInitializer
- ContextConsumer<C extends org.springframework.context.ApplicationContext> - Interface in org.springframework.boot.test.context.runner
-
Callback interface used to process an
ApplicationContextwith the ability to throw a (checked) exception. - createExpectationManager() - Method in class org.springframework.boot.test.web.client.MockServerRestClientCustomizer
- createExpectationManager() - Method in class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
- createHttpContext(HttpMethod, URI) - Method in class org.springframework.boot.test.web.client.TestRestTemplate.CustomHttpComponentsClientHttpRequestFactory
- createModifiedConfig(MergedContextConfiguration, Class<?>[]) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
-
Create a new
MergedContextConfigurationwith different classes. - createModifiedConfig(MergedContextConfiguration, Class<?>[], String[]) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
-
Create a new
MergedContextConfigurationwith different classes and properties. - createRequestConfig() - Method in class org.springframework.boot.test.web.client.TestRestTemplate.CustomHttpComponentsClientHttpRequestFactory
- createSpyIfNecessary(Object, String) - Method in class org.springframework.boot.test.mock.mockito.MockitoPostProcessor
-
Deprecated.
- createTester(Class<?>, ResolvableType, M) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester.FieldInitializer
- CustomHttpComponentsClientHttpRequestFactory(TestRestTemplate.HttpClientOption[], ClientHttpRequestFactorySettings) - Constructor for class org.springframework.boot.test.web.client.TestRestTemplate.CustomHttpComponentsClientHttpRequestFactory
-
Create a new
TestRestTemplate.CustomHttpComponentsClientHttpRequestFactoryinstance. - CustomHttpComponentsClientHttpRequestFactory(TestRestTemplate.HttpClientOption[], ClientHttpRequestFactorySettings) - Constructor for class org.springframework.boot.test.web.client.TestRestTemplate.CustomHttpComponentsClientHttpRequestFactory
-
Deprecated, for removal: This API element is subject to removal in a future version.since 3.4.0 for removal in 4.0.0 in favor of
CustomHttpComponentsClientHttpRequestFactory(HttpClientOption[], ClientHttpRequestFactorySettings) - customize(WebTestClient.Builder) - Method in interface org.springframework.boot.test.web.reactive.server.WebTestClientBuilderCustomizer
-
Customize the given
builder. - customize(RestClient.Builder) - Method in class org.springframework.boot.test.web.client.MockServerRestClientCustomizer
- customize(RestTemplate) - Method in class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
D
- DEFINED_PORT - Enum constant in enum class org.springframework.boot.test.context.SpringBootTest.WebEnvironment
-
Creates a (reactive) web application context without defining any
server.port=0Environmentproperty. - delete(String, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Delete the resources at the specified URI.
- delete(String, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Delete the resources at the specified URI.
- delete(URI) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Delete the resources at the specified URL.
- detectDefaultConfigurationClasses(Class<?>) - Method in class org.springframework.boot.test.context.SpringBootContextLoader
-
Detect the default configuration classes for the supplied test class.
- determineResourceBasePath(MergedContextConfiguration) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
-
Determines the resource base path for web applications using the value of
@WebAppConfiguration, if any, on the test class of the givenconfiguration. - doesNotHaveBean(Class<?>) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Verifies that the application context (or ancestors) does not contain any beans of the given type.
- doesNotHaveBean(Class<?>, ApplicationContextAssert.Scope) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Verifies that the application context does not contain any beans of the given type.
- doesNotHaveBean(String) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Verifies that the application context does not contain a beans of the given name.
- doesNotHaveEmptyJsonPathValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the actual value at the given JSON path does not produce an
emptyresult. - doesNotHaveJsonPath(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the JSON path is not present, even if it has a
nullvalue. - doesNotHaveJsonPathValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the actual value at the given JSON path produces no result.
- doWithField(Field, Object, ObjectFactory<M>) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester.FieldInitializer
E
- empty() - Static method in class org.springframework.boot.test.util.TestPropertyValues
-
Return an empty
TestPropertyValuesinstance. - ENABLE_COOKIES - Enum constant in enum class org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption
-
Enable cookies.
- ENABLE_REDIRECTS - Enum constant in enum class org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption
-
Enable redirects.
- exchange(String, HttpMethod, HttpEntity<?>, Class<T>, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as
ResponseEntity. - exchange(String, HttpMethod, HttpEntity<?>, Class<T>, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as
ResponseEntity. - exchange(String, HttpMethod, HttpEntity<?>, ParameterizedTypeReference<T>, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as
ResponseEntity. - exchange(String, HttpMethod, HttpEntity<?>, ParameterizedTypeReference<T>, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as
ResponseEntity. - exchange(URI, HttpMethod, HttpEntity<?>, Class<T>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as
ResponseEntity. - exchange(URI, HttpMethod, HttpEntity<?>, ParameterizedTypeReference<T>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the HTTP method to the given URI template, writing the given request entity to the request, and returns the response as
ResponseEntity. - exchange(RequestEntity<?>, Class<T>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the request specified in the given
RequestEntityand return the response asResponseEntity. - exchange(RequestEntity<?>, ParameterizedTypeReference<T>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the request specified in the given
RequestEntityand return the response asResponseEntity. - execute(String, HttpMethod, RequestCallback, ResponseExtractor<T>, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the HTTP method to the given URI template, preparing the request with the
RequestCallback, and reading the response with aResponseExtractor. - execute(String, HttpMethod, RequestCallback, ResponseExtractor<T>, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the HTTP method to the given URI template, preparing the request with the
RequestCallback, and reading the response with aResponseExtractor. - execute(URI, HttpMethod, RequestCallback, ResponseExtractor<T>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Execute the HTTP method to the given URL, preparing the request with the
RequestCallback, and reading the response with aResponseExtractor. - expect(Matcher<? super String>) - Method in class org.springframework.boot.test.system.OutputCaptureRule
-
Verify that the output is matched by the supplied
matcher. - expectRequest(ExpectedCount, RequestMatcher) - Method in class org.springframework.boot.test.web.client.RootUriRequestExpectationManager
- extractingJsonPathArrayValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Extract the array value at the given JSON path for further object assertions.
- extractingJsonPathBooleanValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Extract the boolean value at the given JSON path for further object assertions.
- extractingJsonPathMapValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Extract the map value at the given JSON path for further object assertions.
- extractingJsonPathNumberValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Extract the number value at the given JSON path for further object assertions.
- extractingJsonPathStringValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Extract the string value at the given JSON path for further object assertions.
- extractingJsonPathValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Extract the value at the given JSON path for further object assertions.
- extraInterfaces() - Element in annotation interface org.springframework.boot.test.mock.mockito.MockBean
-
Deprecated.Any extra interfaces that should also be declared on the mock.
F
- FieldInitializer(Class<? extends AbstractJsonMarshalTester>) - Constructor for class org.springframework.boot.test.json.AbstractJsonMarshalTester.FieldInitializer
- FilteredClassLoader - Class in org.springframework.boot.test.context
-
Test
URLClassLoaderthat can filter the classes and resources it can load. - FilteredClassLoader(Class<?>...) - Constructor for class org.springframework.boot.test.context.FilteredClassLoader
-
Create a
FilteredClassLoaderthat hides the given classes. - FilteredClassLoader(ClassLoader, Class<?>...) - Constructor for class org.springframework.boot.test.context.FilteredClassLoader
-
Create a
FilteredClassLoaderwith the givenparentthat hides the given classes. - FilteredClassLoader(String...) - Constructor for class org.springframework.boot.test.context.FilteredClassLoader
-
Create a
FilteredClassLoaderthat hides classes from the given packages. - FilteredClassLoader(Predicate<String>...) - Constructor for class org.springframework.boot.test.context.FilteredClassLoader
-
Create a
FilteredClassLoaderthat filters based on the given predicate. - FilteredClassLoader(ClassPathResource...) - Constructor for class org.springframework.boot.test.context.FilteredClassLoader
-
Create a
FilteredClassLoaderthat hides resources from the givenclasspath resources. - FilteredClassLoader.ClassFilter - Class in org.springframework.boot.test.context
-
Filter to restrict the classes that can be loaded.
- FilteredClassLoader.ClassPathResourceFilter - Class in org.springframework.boot.test.context
-
Filter to restrict the resources that can be loaded.
- FilteredClassLoader.PackageFilter - Class in org.springframework.boot.test.context
-
Filter to restrict the packages that can be loaded.
- findFromClass(Class<?>) - Method in class org.springframework.boot.test.context.AnnotatedClassFinder
-
Find the first
Classthat is annotated with the target annotation, starting from the package defined by the givensourceup to the root. - findFromPackage(String) - Method in class org.springframework.boot.test.context.AnnotatedClassFinder
-
Find the first
Classthat is annotated with the target annotation, starting from the package defined by the givensourceup to the root. - forRestTemplate(RestTemplate, RequestExpectationManager) - Static method in class org.springframework.boot.test.web.client.RootUriRequestExpectationManager
-
Return
RequestExpectationManagerto be used for binding with the specifiedRestTemplate. - forView(Class<?>) - Method in class org.springframework.boot.test.json.JacksonTester
-
Returns a new instance of
JacksonTesterwith the view that should be used for json serialization/deserialization. - from(byte[]) - Method in class org.springframework.boot.test.json.BasicJsonTester
-
Create JSON content from the specified JSON bytes.
- from(File) - Method in class org.springframework.boot.test.json.BasicJsonTester
-
Create JSON content from the specified JSON file.
- from(InputStream) - Method in class org.springframework.boot.test.json.BasicJsonTester
-
Create JSON content from the specified JSON input stream.
- from(CharSequence) - Method in class org.springframework.boot.test.json.BasicJsonTester
-
Create JSON content from the specified String source.
- from(String, Class<?>) - Method in class org.springframework.boot.test.json.BasicJsonTester
-
Create JSON content from the specified resource path.
- from(Resource) - Method in class org.springframework.boot.test.json.BasicJsonTester
-
Create JSON content from the specified JSON resource.
- fromMapEntry(Map.Entry<String, String>) - Static method in class org.springframework.boot.test.util.TestPropertyValues.Pair
-
Factory method to create a
TestPropertyValues.Pairfrom aMap.Entry.
G
- get(Class<T>, Class<? extends C>, Supplier<? extends C>) - Static method in interface org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider
-
Factory method to create a new
ApplicationContextAssertProviderinstance. - get(Class<T>, Class<? extends C>, Supplier<? extends C>, Class<?>...) - Static method in interface org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider
-
Factory method to create a new
ApplicationContextAssertProviderinstance. - get(String) - Method in class org.springframework.boot.test.web.htmlunit.webdriver.LocalHostWebConnectionHtmlUnitDriver
- get(Supplier<? extends ConfigurableReactiveWebApplicationContext>) - Static method in interface org.springframework.boot.test.context.assertj.AssertableReactiveWebApplicationContext
-
Factory method to create a new
AssertableReactiveWebApplicationContextinstance. - get(Supplier<? extends ConfigurableReactiveWebApplicationContext>, Class<?>...) - Static method in interface org.springframework.boot.test.context.assertj.AssertableReactiveWebApplicationContext
-
Factory method to create a new
AssertableReactiveWebApplicationContextinstance. - get(Supplier<? extends ConfigurableApplicationContext>) - Static method in interface org.springframework.boot.test.context.assertj.AssertableApplicationContext
-
Factory method to create a new
AssertableApplicationContextinstance. - get(Supplier<? extends ConfigurableApplicationContext>, Class<?>...) - Static method in interface org.springframework.boot.test.context.assertj.AssertableApplicationContext
-
Factory method to create a new
AssertableApplicationContextinstance. - get(Supplier<? extends ConfigurableWebApplicationContext>) - Static method in interface org.springframework.boot.test.context.assertj.AssertableWebApplicationContext
-
Factory method to create a new
AssertableWebApplicationContextinstance. - get(Supplier<? extends ConfigurableWebApplicationContext>, Class<?>...) - Static method in interface org.springframework.boot.test.context.assertj.AssertableWebApplicationContext
-
Factory method to create a new
AssertableWebApplicationContextinstance. - getAll() - Method in interface org.springframework.boot.test.system.CapturedOutput
-
Return all content (both
System.outandSystem.err) in the order that it was captured. - getAll() - Method in class org.springframework.boot.test.system.OutputCaptureRule
- getAnnotation(Class<?>) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
- getApplicationContext() - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
- getApplicationContextFactory(MergedContextConfiguration) - Method in class org.springframework.boot.test.context.SpringBootContextLoader
-
Return the
ApplicationContextFactorythat should be used for the test. - getBean(Class<T>) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Obtain a single bean of the given type from the application context (or ancestors), the bean becoming the object under test.
- getBean(Class<T>, ApplicationContextAssert.Scope) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Obtain a single bean of the given type from the application context, the bean becoming the object under test.
- getBean(String) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Obtain a single bean of the given name from the application context, the bean becoming the object under test.
- getBean(String, Class<T>) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Obtain a single bean of the given name and type from the application context, the bean becoming the object under test.
- getBeanNames(Class<T>) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Obtain the beans names of the given type from the application context, the names becoming the object array under test.
- getBeans(Class<T>) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Obtain a map bean names and instances of the given type from the application context (or ancestors), the map becoming the object under test.
- getBeans(Class<T>, ApplicationContextAssert.Scope) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Obtain a map bean names and instances of the given type from the application context, the map becoming the object under test.
- getClasses(Class<?>) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
- getDefaultContextLoaderClass(Class<?>) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
- getDifferentiatorPropertySourceProperty() - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
-
Return a "differentiator" property to ensure that there is something to differentiate regular tests and bootstrapped tests.
- getEnvironment() - Method in class org.springframework.boot.test.context.SpringBootContextLoader
-
Returns the
ConfigurableEnvironmentinstance that should be applied toSpringApplicationornullto use the default. - getErr() - Method in interface org.springframework.boot.test.system.CapturedOutput
-
Return
System.errcontent in the order that it was captured. - getErr() - Method in class org.springframework.boot.test.system.OutputCaptureRule
- getExpectationManagers() - Method in class org.springframework.boot.test.web.client.MockServerRestClientCustomizer
- getExpectationManagers() - Method in class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
- getFailure() - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Obtain the failure that stopped the application context from running, the failure becoming the object under test.
- getForEntity(String, Class<T>, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Retrieve an entity by doing a GET on the specified URL.
- getForEntity(String, Class<T>, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Retrieve a representation by doing a GET on the URI template.
- getForEntity(URI, Class<T>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Retrieve a representation by doing a GET on the URL .
- getForObject(String, Class<T>, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Retrieve a representation by doing a GET on the specified URL.
- getForObject(String, Class<T>, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Retrieve a representation by doing a GET on the URI template.
- getForObject(URI, Class<T>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Retrieve a representation by doing a GET on the URL .
- getInitializers(MergedContextConfiguration, SpringApplication) - Method in class org.springframework.boot.test.context.SpringBootContextLoader
-
Return the
initializersthat will be applied to the context. - getInlinedProperties(MergedContextConfiguration) - Method in class org.springframework.boot.test.context.SpringBootContextLoader
- getJson() - Method in class org.springframework.boot.test.json.JsonContent
-
Return the actual JSON content string.
- getJsonContent(String) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Factory method used to get a
JsonContentinstance from a source JSON string. - getJsonContent(String) - Method in class org.springframework.boot.test.json.JacksonTester
- getObject() - Method in class org.springframework.boot.test.json.ObjectContent
-
Return the actual object content.
- getOrder() - Method in class org.springframework.boot.test.mock.mockito.MockitoPostProcessor
-
Deprecated.
- getOrder() - Method in class org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener
-
Deprecated.
- getOrder() - Method in class org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener
-
Deprecated.
- getOrFindConfigurationClasses(MergedContextConfiguration) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
- getOut() - Method in interface org.springframework.boot.test.system.CapturedOutput
-
Return
System.outcontent in the order that it was captured. - getOut() - Method in class org.springframework.boot.test.system.OutputCaptureRule
- getPage(String) - Method in class org.springframework.boot.test.web.htmlunit.LocalHostWebClient
- getProperties(Class<?>) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
- getResource(String) - Method in class org.springframework.boot.test.context.FilteredClassLoader
- getResource(String) - Method in class org.springframework.boot.test.mock.web.SpringBootMockServletContext
- getResourceAsStream(String) - Method in class org.springframework.boot.test.context.FilteredClassLoader
- getResourceBasePathLocation(String) - Method in class org.springframework.boot.test.mock.web.SpringBootMockServletContext
- getResourceLoadClass() - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return class used to load relative resources.
- getResourceLocation(String) - Method in class org.springframework.boot.test.mock.web.SpringBootMockServletContext
- getResources(String) - Method in class org.springframework.boot.test.context.FilteredClassLoader
- getResourceSuffix() - Method in class org.springframework.boot.test.context.SpringBootContextLoader
- getResourceSuffixes() - Method in class org.springframework.boot.test.context.SpringBootContextLoader
- getRestTemplate() - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Returns the underlying
RestTemplatethat is actually used to perform the REST operations. - getRootUri() - Method in class org.springframework.boot.test.web.client.LocalHostUriTemplateHandler
- getRootUri() - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Returns the root URI applied by
RestTemplateBuilder.rootUri(String)or""if the root URI has not been applied. - getServer() - Method in class org.springframework.boot.test.web.client.MockServerRestClientCustomizer
- getServer() - Method in class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
- getServer(RestClient.Builder) - Method in class org.springframework.boot.test.web.client.MockServerRestClientCustomizer
- getServer(RestTemplate) - Method in class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
- getServers() - Method in class org.springframework.boot.test.web.client.MockServerRestClientCustomizer
- getServers() - Method in class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
- getSourceApplicationContext() - Method in interface org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider
-
Return the original source
ApplicationContext. - getSourceApplicationContext(Class<T>) - Method in interface org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider
-
Return the original source
ApplicationContext, casting it to the requested type. - getSourceClass() - Method in enum class org.springframework.boot.test.util.TestPropertyValues.Type
- getSpringApplication() - Method in class org.springframework.boot.test.context.SpringBootContextLoader
-
Builds new
SpringApplicationinstance. - getStartupFailure() - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
- getStartupFailure() - Method in interface org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider
-
Return the failure that caused application context to fail or
nullif the context started without issue. - getType() - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return the type under test.
- getWebEnvironment(Class<?>) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
-
Return the
SpringBootTest.WebEnvironmenttype for this test or null if undefined. - GsonTester<T> - Class in org.springframework.boot.test.json
-
AssertJ based JSON tester backed by Gson.
- GsonTester(Gson) - Constructor for class org.springframework.boot.test.json.GsonTester
-
Create a new uninitialized
GsonTesterinstance. - GsonTester(Class<?>, ResolvableType, Gson) - Constructor for class org.springframework.boot.test.json.GsonTester
-
Create a new
GsonTesterinstance.
H
- hasBean(String) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Verifies that the application context contains a bean with the given name.
- hasEmptyJsonPathValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the actual value at the given JSON path produces an
emptyresult. - hasFailed() - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Verifies that the application has failed to start.
- hasJsonPath(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the JSON path is present without checking if it has a value.
- hasJsonPathArrayValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the actual value at the given JSON path produces a non-null array result.
- hasJsonPathBooleanValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the actual value at the given JSON path produces a non-null boolean result.
- hasJsonPathMapValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the actual value at the given JSON path produces a non-null map result.
- hasJsonPathNumberValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the actual value at the given JSON path produces a non-null number result.
- hasJsonPathStringValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the actual value at the given JSON path produces a non-null string result.
- hasJsonPathValue(CharSequence, Object...) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verify that the actual value at the given JSON path produces a non-null result.
- hasNotFailed() - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Verifies that the application has not failed to start.
- hasSingleBean(Class<?>) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Verifies that the application context (or ancestors) contains a single bean with the given type.
- hasSingleBean(Class<?>, ApplicationContextAssert.Scope) - Method in class org.springframework.boot.test.context.assertj.ApplicationContextAssert
-
Verifies that the application context contains a single bean with the given type.
- headForHeaders(String, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Retrieve all headers of the resource specified by the URI template.
- headForHeaders(String, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Retrieve all headers of the resource specified by the URI template.
- headForHeaders(URI) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Retrieve all headers of the resource specified by the URL.
I
- INCLUDE_ANCESTORS - Enum constant in enum class org.springframework.boot.test.context.assertj.ApplicationContextAssert.Scope
-
Consider the ancestor contexts as well as the current context.
- initFields(Object, ObjectMapper) - Static method in class org.springframework.boot.test.json.JacksonTester
-
Utility method to initialize
JacksonTesterfields. - initFields(Object, Gson) - Static method in class org.springframework.boot.test.json.GsonTester
-
Utility method to initialize
GsonTesterfields. - initFields(Object, Jsonb) - Static method in class org.springframework.boot.test.json.JsonbTester
-
Utility method to initialize
JsonbTesterfields. - initFields(Object, M) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester.FieldInitializer
- initFields(Object, ObjectFactory<ObjectMapper>) - Static method in class org.springframework.boot.test.json.JacksonTester
-
Utility method to initialize
JacksonTesterfields. - initFields(Object, ObjectFactory<Gson>) - Static method in class org.springframework.boot.test.json.GsonTester
-
Utility method to initialize
GsonTesterfields. - initFields(Object, ObjectFactory<Jsonb>) - Static method in class org.springframework.boot.test.json.JsonbTester
-
Utility method to initialize
JsonbTesterfields. - initFields(Object, ObjectFactory<M>) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester.FieldInitializer
- initialize(Class<?>) - Method in class org.springframework.boot.test.json.BasicJsonTester
-
Initialize the marshal tester for use, configuring it to load JSON resources as UTF-8.
- initialize(Class<?>, Charset) - Method in class org.springframework.boot.test.json.BasicJsonTester
-
Initialize the marshal tester for use.
- initialize(Class<?>, ResolvableType) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Initialize the marshal tester for use.
- initialize(ConfigurableApplicationContext) - Method in class org.springframework.boot.test.context.ConfigDataApplicationContextInitializer
- isEmbedded() - Method in enum class org.springframework.boot.test.context.SpringBootTest.WebEnvironment
-
Return if the environment uses an
ServletWebServerApplicationContext. - isEqualTo(Object) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Overridden version of
isEqualToto perform JSON tests based on the object type. - isEqualToJson(byte[]) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
lenientlyequal to the specified JSON bytes. - isEqualToJson(byte[], JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON bytes.
- isEqualToJson(byte[], JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON bytes.
- isEqualToJson(File) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
lenientlyequal to the specified JSON file. - isEqualToJson(File, JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON file.
- isEqualToJson(File, JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON file.
- isEqualToJson(InputStream) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
lenientlyequal to the specified JSON input stream. - isEqualToJson(InputStream, JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON input stream.
- isEqualToJson(InputStream, JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON input stream.
- isEqualToJson(CharSequence) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
lenientlyequal to the specified JSON. - isEqualToJson(CharSequence, JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON.
- isEqualToJson(CharSequence, JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON.
- isEqualToJson(String, Class<?>) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
lenientlyequal to the specified JSON resource. - isEqualToJson(String, Class<?>, JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON resource.
- isEqualToJson(String, Class<?>, JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON resource.
- isEqualToJson(Resource) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
lenientlyequal to the specified JSON resource. - isEqualToJson(Resource, JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON resource.
- isEqualToJson(Resource, JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is equal to the specified JSON resource.
- isNotEqualTo(Object) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Overridden version of
isNotEqualToto perform JSON tests based on the object type. - isNotEqualToJson(byte[]) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
lenientlyequal to the specified JSON bytes. - isNotEqualToJson(byte[], JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON bytes.
- isNotEqualToJson(byte[], JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON bytes.
- isNotEqualToJson(File) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
lenientlyequal to the specified JSON file. - isNotEqualToJson(File, JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON file.
- isNotEqualToJson(File, JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON file.
- isNotEqualToJson(InputStream) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
lenientlyequal to the specified JSON input stream. - isNotEqualToJson(InputStream, JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON input stream.
- isNotEqualToJson(InputStream, JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON input stream.
- isNotEqualToJson(CharSequence) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
lenientlyequal to the specified JSON. - isNotEqualToJson(CharSequence, JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON.
- isNotEqualToJson(CharSequence, JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON.
- isNotEqualToJson(String, Class<?>) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
lenientlyequal to the specified JSON resource. - isNotEqualToJson(String, Class<?>, JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON resource.
- isNotEqualToJson(String, Class<?>, JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON resource.
- isNotEqualToJson(Resource) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
lenientlyequal to the specified JSON resource. - isNotEqualToJson(Resource, JSONComparator) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON resource.
- isNotEqualToJson(Resource, JSONCompareMode) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not equal to the specified JSON resource.
- isNotStrictlyEqualToJson(byte[]) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
strictlyequal to the specified JSON bytes. - isNotStrictlyEqualToJson(File) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
strictlyequal to the specified JSON file. - isNotStrictlyEqualToJson(InputStream) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
strictlyequal to the specified JSON input stream. - isNotStrictlyEqualToJson(CharSequence) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
strictlyequal to the specified JSON. - isNotStrictlyEqualToJson(String, Class<?>) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
strictlyequal to the specified JSON resource. - isNotStrictlyEqualToJson(Resource) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is not
strictlyequal to the specified JSON resource. - isStrictlyEqualToJson(byte[]) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
strictlyequal to the specified JSON bytes. - isStrictlyEqualToJson(File) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
strictlyequal to the specified JSON file. - isStrictlyEqualToJson(InputStream) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
strictlyequal to the specified JSON input stream. - isStrictlyEqualToJson(CharSequence) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
strictlyequal to the specified JSON. - isStrictlyEqualToJson(String, Class<?>) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
strictlyequal to the specified JSON resource. - isStrictlyEqualToJson(Resource) - Method in class org.springframework.boot.test.json.JsonContentAssert
-
Verifies that the actual value is
strictlyequal to the specified JSON resource.
J
- JacksonTester<T> - Class in org.springframework.boot.test.json
-
AssertJ based JSON tester backed by Jackson.
- JacksonTester(ObjectMapper) - Constructor for class org.springframework.boot.test.json.JacksonTester
-
Create a new
JacksonTesterinstance. - JacksonTester(Class<?>, ResolvableType, ObjectMapper) - Constructor for class org.springframework.boot.test.json.JacksonTester
-
Create a new
JacksonTesterinstance. - JacksonTester(Class<?>, ResolvableType, ObjectMapper, Class<?>) - Constructor for class org.springframework.boot.test.json.JacksonTester
- JsonbTester<T> - Class in org.springframework.boot.test.json
-
AssertJ based JSON tester backed by Jsonb.
- JsonbTester(Jsonb) - Constructor for class org.springframework.boot.test.json.JsonbTester
-
Create a new uninitialized
JsonbTesterinstance. - JsonbTester(Class<?>, ResolvableType, Jsonb) - Constructor for class org.springframework.boot.test.json.JsonbTester
-
Create a new
JsonbTesterinstance. - JsonContent<T> - Class in org.springframework.boot.test.json
-
JSON content usually created from a JSON tester.
- JsonContent(Class<?>, ResolvableType, String) - Constructor for class org.springframework.boot.test.json.JsonContent
-
Create a new
JsonContentinstance. - JsonContentAssert - Class in org.springframework.boot.test.json
-
AssertJ
AssertforJsonContent. - JsonContentAssert(Class<?>, CharSequence) - Constructor for class org.springframework.boot.test.json.JsonContentAssert
-
Create a new
JsonContentAssertinstance that will load resources as UTF-8. - JsonContentAssert(Class<?>, Charset, CharSequence) - Constructor for class org.springframework.boot.test.json.JsonContentAssert
-
Create a new
JsonContentAssertinstance that will load resources in the givencharset.
L
- length() - Method in interface org.springframework.boot.test.system.CapturedOutput
- loadClass(String, boolean) - Method in class org.springframework.boot.test.context.FilteredClassLoader
- loadContext(MergedContextConfiguration) - Method in class org.springframework.boot.test.context.SpringBootContextLoader
- loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints) - Method in class org.springframework.boot.test.context.SpringBootContextLoader
- loadContextForAotRuntime(MergedContextConfiguration, ApplicationContextInitializer<ConfigurableApplicationContext>) - Method in class org.springframework.boot.test.context.SpringBootContextLoader
- LocalHostUriTemplateHandler - Class in org.springframework.boot.test.web.client
-
UriTemplateHandlerwill automatically prefix relative URIs withlocalhost:${local.server.port}. - LocalHostUriTemplateHandler(Environment) - Constructor for class org.springframework.boot.test.web.client.LocalHostUriTemplateHandler
-
Create a new
LocalHostUriTemplateHandlerthat will generatehttpURIs using the givenenvironmentto determine the context path and port. - LocalHostUriTemplateHandler(Environment, String) - Constructor for class org.springframework.boot.test.web.client.LocalHostUriTemplateHandler
-
Create a new
LocalHostUriTemplateHandlerthat will generate URIs with the givenschemeand use the givenenvironmentto determine the context-path and port. - LocalHostUriTemplateHandler(Environment, String, UriTemplateHandler) - Constructor for class org.springframework.boot.test.web.client.LocalHostUriTemplateHandler
-
Create a new
LocalHostUriTemplateHandlerthat will generate URIs with the givenscheme, use the givenenvironmentto determine the context-path and port and delegate to the given templatehandler. - LocalHostWebClient - Class in org.springframework.boot.test.web.htmlunit
-
WebClientwill automatically prefix relative URLs withlocalhost:${local.server.port}. - LocalHostWebClient(Environment) - Constructor for class org.springframework.boot.test.web.htmlunit.LocalHostWebClient
- LocalHostWebConnectionHtmlUnitDriver - Class in org.springframework.boot.test.web.htmlunit.webdriver
-
LocalHostWebConnectionHtmlUnitDriverwill automatically prefix relative URLs withlocalhost:${local.server.port}. - LocalHostWebConnectionHtmlUnitDriver(Environment) - Constructor for class org.springframework.boot.test.web.htmlunit.webdriver.LocalHostWebConnectionHtmlUnitDriver
- LocalHostWebConnectionHtmlUnitDriver(Environment, boolean) - Constructor for class org.springframework.boot.test.web.htmlunit.webdriver.LocalHostWebConnectionHtmlUnitDriver
- LocalHostWebConnectionHtmlUnitDriver(Environment, BrowserVersion) - Constructor for class org.springframework.boot.test.web.htmlunit.webdriver.LocalHostWebConnectionHtmlUnitDriver
- LocalHostWebConnectionHtmlUnitDriver(Environment, Capabilities) - Constructor for class org.springframework.boot.test.web.htmlunit.webdriver.LocalHostWebConnectionHtmlUnitDriver
- LocalManagementPort - Annotation Interface in org.springframework.boot.test.web.server
-
Annotation at the field or method/constructor parameter level that injects the HTTP management port that was allocated at runtime.
- LocalRSocketServerPort - Annotation Interface in org.springframework.boot.test.rsocket.server
-
Annotation at the field or method/constructor parameter level that injects the RSocket port that was allocated at runtime.
- LocalServerPort - Annotation Interface in org.springframework.boot.test.web.server
-
Annotation at the field or method/constructor parameter level that injects the HTTP server port that was allocated at runtime.
M
- main(String[]) - Static method in class org.springframework.boot.test.context.SpringBootTestAotProcessor
- MAP - Enum constant in enum class org.springframework.boot.test.util.TestPropertyValues.Type
-
Used for
MapPropertySource. - MOCK - Enum constant in enum class org.springframework.boot.test.context.SpringBootTest.WebEnvironment
-
Creates a
WebApplicationContextwith a mock servlet environment if servlet APIs are on the classpath, aReactiveWebApplicationContextif Spring WebFlux is on the classpath or a regularApplicationContextotherwise. - MockBean - Annotation Interface in org.springframework.boot.test.mock.mockito
-
Deprecated, for removal: This API element is subject to removal in a future version.since 3.4.0 for removal in 4.0.0 in favor of
MockitoBean - MockBeans - Annotation Interface in org.springframework.boot.test.mock.mockito
-
Deprecated, for removal: This API element is subject to removal in a future version.since 3.4.0 for removal in 4.0.0 in favor of
MockitoBean - MockitoPostProcessor - Class in org.springframework.boot.test.mock.mockito
-
Deprecated.since 3.4.0 for removal in 4.0.0 in favor of Spring Framework's
MockitoBeanandMockitoSpyBeansupport - MockitoPostProcessor(Set<Definition>) - Constructor for class org.springframework.boot.test.mock.mockito.MockitoPostProcessor
-
Deprecated.Create a new
MockitoPostProcessorinstance with the given initial definitions. - MockitoTestExecutionListener - Class in org.springframework.boot.test.mock.mockito
-
Deprecated, for removal: This API element is subject to removal in a future version.since 3.4.0 for removal in 4.0.0 in favor of Spring Framework's support for
MockitoBeanandMockitoSpyBean. - MockitoTestExecutionListener() - Constructor for class org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener
-
Deprecated.
- MockReset - Enum Class in org.springframework.boot.test.mock.mockito
-
Deprecated, for removal: This API element is subject to removal in a future version.since 3.4.0 for removal in 4.0.0 in favor of
MockReset - MockServerRestClientCustomizer - Class in org.springframework.boot.test.web.client
-
RestClientCustomizerthat can be applied toRestClient.Builderinstances to addMockRestServiceServersupport. - MockServerRestClientCustomizer() - Constructor for class org.springframework.boot.test.web.client.MockServerRestClientCustomizer
- MockServerRestClientCustomizer(Class<? extends RequestExpectationManager>) - Constructor for class org.springframework.boot.test.web.client.MockServerRestClientCustomizer
-
Create a new
MockServerRestClientCustomizerinstance. - MockServerRestClientCustomizer(Supplier<? extends RequestExpectationManager>) - Constructor for class org.springframework.boot.test.web.client.MockServerRestClientCustomizer
-
Create a new
MockServerRestClientCustomizerinstance. - MockServerRestTemplateCustomizer - Class in org.springframework.boot.test.web.client
-
RestTemplateCustomizerthat can be applied to aRestTemplateBuilderinstances to addMockRestServiceServersupport. - MockServerRestTemplateCustomizer() - Constructor for class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
- MockServerRestTemplateCustomizer(Class<? extends RequestExpectationManager>) - Constructor for class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
-
Create a new
MockServerRestTemplateCustomizerinstance. - MockServerRestTemplateCustomizer(Supplier<? extends RequestExpectationManager>) - Constructor for class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
-
Create a new
MockServerRestTemplateCustomizerinstance.
N
- name() - Element in annotation interface org.springframework.boot.test.mock.mockito.MockBean
-
Deprecated.The name of the bean to register or replace.
- name() - Element in annotation interface org.springframework.boot.test.mock.mockito.SpyBean
-
Deprecated.The name of the bean to spy.
- NEVER - Enum constant in enum class org.springframework.boot.test.context.SpringBootTest.UseMainMethod
-
Never use the
mainmethod, creating a test-specificSpringApplicationinstead. - NO_ANCESTORS - Enum constant in enum class org.springframework.boot.test.context.assertj.ApplicationContextAssert.Scope
-
Limited to the current context.
- NONE - Enum constant in enum class org.springframework.boot.test.context.SpringBootTest.WebEnvironment
-
Creates an
ApplicationContextand setsSpringApplication.setWebApplicationType(WebApplicationType)toWebApplicationType.NONE. - NONE - Enum constant in enum class org.springframework.boot.test.mock.mockito.MockReset
-
Deprecated.Don't reset the mock.
O
- ObjectContent<T> - Class in org.springframework.boot.test.json
-
Object content usually created from
AbstractJsonMarshalTester. - ObjectContent(ResolvableType, T) - Constructor for class org.springframework.boot.test.json.ObjectContent
-
Create a new
ObjectContentinstance. - ObjectContentAssert<A> - Class in org.springframework.boot.test.json
-
AssertJ
AssertforObjectContent. - ObjectContentAssert(A) - Constructor for class org.springframework.boot.test.json.ObjectContentAssert
- of(Class<?>...) - Static method in class org.springframework.boot.test.context.FilteredClassLoader.ClassFilter
- of(Iterable<String>) - Static method in class org.springframework.boot.test.util.TestPropertyValues
-
Return a new
TestPropertyValueswith the underlying map populated with the given property pairs. - of(String...) - Static method in class org.springframework.boot.test.context.FilteredClassLoader.PackageFilter
- of(String...) - Static method in class org.springframework.boot.test.util.TestPropertyValues
-
Return a new
TestPropertyValueswith the underlying map populated with the given property pairs. - of(String, String) - Static method in class org.springframework.boot.test.util.TestPropertyValues.Pair
-
Factory method to create a
TestPropertyValues.Pairfrom a name and value. - of(Map<String, String>) - Static method in class org.springframework.boot.test.util.TestPropertyValues
-
Return a new
TestPropertyValueswith the underlying map populated with the given map entries. - of(Stream<String>) - Static method in class org.springframework.boot.test.util.TestPropertyValues
-
Return a new
TestPropertyValueswith the underlying map populated with the given property pairs. - of(Stream<T>, Function<T, TestPropertyValues.Pair>) - Static method in class org.springframework.boot.test.util.TestPropertyValues
-
Return a new
TestPropertyValueswith the underlying map populated with the given stream. - of(ClassPathResource...) - Static method in class org.springframework.boot.test.context.FilteredClassLoader.ClassPathResourceFilter
- optionsForAllow(String, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Return the value of the
Allowheader for the given URI. - optionsForAllow(String, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Return the value of the
Allowheader for the given URI. - optionsForAllow(URI) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Return the value of the
Allowheader for the given URL. - org.springframework.boot.test.context - package org.springframework.boot.test.context
-
Classes and annotations related to configuring Spring's
ApplicationContextfor tests. - org.springframework.boot.test.context.assertj - package org.springframework.boot.test.context.assertj
-
AssertJ support for ApplicationContexts.
- org.springframework.boot.test.context.runner - package org.springframework.boot.test.context.runner
-
Test utilities to run application contexts for testing.
- org.springframework.boot.test.json - package org.springframework.boot.test.json
-
Support for testing JSON.
- org.springframework.boot.test.mock.mockito - package org.springframework.boot.test.mock.mockito
-
Mockito integration for Spring Boot tests.
- org.springframework.boot.test.mock.web - package org.springframework.boot.test.mock.web
-
Mock web classes specific to Spring Boot.
- org.springframework.boot.test.rsocket.server - package org.springframework.boot.test.rsocket.server
-
RSocket server test utilities and support classes.
- org.springframework.boot.test.system - package org.springframework.boot.test.system
-
Classes for
System-related testing. - org.springframework.boot.test.util - package org.springframework.boot.test.util
-
General purpose test utilities.
- org.springframework.boot.test.web.client - package org.springframework.boot.test.web.client
-
Web client test utilities.
- org.springframework.boot.test.web.htmlunit - package org.springframework.boot.test.web.htmlunit
-
HtmlUnit support classes.
- org.springframework.boot.test.web.htmlunit.webdriver - package org.springframework.boot.test.web.htmlunit.webdriver
-
Selenium support classes.
- org.springframework.boot.test.web.reactive.server - package org.springframework.boot.test.web.reactive.server
-
Spring Boot support for testing Spring WebFlux server endpoints via
WebTestClient. - org.springframework.boot.test.web.server - package org.springframework.boot.test.web.server
-
Web server test utilities and support classes.
- OutputCaptureExtension - Class in org.springframework.boot.test.system
- OutputCaptureRule - Class in org.springframework.boot.test.system
-
JUnit
@Ruleto capture output fromSystem.outandSystem.err. - OutputCaptureRule() - Constructor for class org.springframework.boot.test.system.OutputCaptureRule
P
- parse(byte[]) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return
ObjectContentfrom parsing the specific JSON bytes. - parse(String) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return
ObjectContentfrom parsing the specific JSON String. - parse(String) - Static method in class org.springframework.boot.test.util.TestPropertyValues.Pair
- parseObject(byte[]) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return the object created from parsing the specific JSON bytes.
- parseObject(String) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return the object created from parsing the specific JSON String.
- patchForObject(String, Object, Class<T>, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Update a resource by PATCHing the given object to the URI template, and returns the representation found in the response.
- patchForObject(String, Object, Class<T>, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Update a resource by PATCHing the given object to the URI template, and returns the representation found in the response.
- patchForObject(URI, Object, Class<T>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Update a resource by PATCHing the given object to the URL, and returns the representation found in the response.
- postForEntity(String, Object, Class<T>, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new resource by POSTing the given object to the URI template, and returns the response as
ResponseEntity. - postForEntity(String, Object, Class<T>, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new resource by POSTing the given object to the URI template, and returns the response as
HttpEntity. - postForEntity(URI, Object, Class<T>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new resource by POSTing the given object to the URL, and returns the response as
ResponseEntity. - postForLocation(String, Object, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new resource by POSTing the given object to the URI template, and returns the value of the
Locationheader. - postForLocation(String, Object, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new resource by POSTing the given object to the URI template, and returns the value of the
Locationheader. - postForLocation(URI, Object) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new resource by POSTing the given object to the URL, and returns the value of the
Locationheader. - postForObject(String, Object, Class<T>, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new resource by POSTing the given object to the URI template, and returns the representation found in the response.
- postForObject(String, Object, Class<T>, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new resource by POSTing the given object to the URI template, and returns the representation found in the response.
- postForObject(URI, Object, Class<T>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new resource by POSTing the given object to the URL, and returns the representation found in the response.
- postProcessBeanFactory(ConfigurableListableBeanFactory) - Method in class org.springframework.boot.test.mock.mockito.MockitoPostProcessor
-
Deprecated.
- postProcessProperties(PropertyValues, Object, String) - Method in class org.springframework.boot.test.mock.mockito.MockitoPostProcessor
-
Deprecated.
- prepare(ContextConsumer<? super A>) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Prepare a new
ApplicationContextbased on the current state of this loader. - prepareTestInstance(TestContext) - Method in class org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener
-
Deprecated.
- processContextConfiguration(ContextConfigurationAttributes) - Method in class org.springframework.boot.test.context.SpringBootContextLoader
- processMergedContextConfiguration(MergedContextConfiguration) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
- processPropertySourceProperties(MergedContextConfiguration, List<String>) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
-
Post process the property source properties, adding or removing elements as required.
- properties() - Element in annotation interface org.springframework.boot.test.context.SpringBootTest
-
Properties in form key=value that should be added to the Spring
Environmentbefore the test runs. - proxyBeanMethods() - Element in annotation interface org.springframework.boot.test.context.TestConfiguration
-
Specify whether
@Beanmethods should get proxied in order to enforce bean lifecycle behavior, e.g. - proxyTargetAware() - Element in annotation interface org.springframework.boot.test.mock.mockito.SpyBean
-
Deprecated.Indicates that Mockito methods such as
verify(mock)should use thetargetof AOP advised beans, rather than the proxy itself. - publicDefineClass(String, byte[], ProtectionDomain) - Method in class org.springframework.boot.test.context.FilteredClassLoader
- put(String, Object, Object...) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Create or update a resource by PUTting the given object to the URI.
- put(String, Object, Map<String, ?>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Creates a new resource by PUTting the given object to URI template.
- put(URI, Object) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Creates a new resource by PUTting the given object to URL.
R
- RANDOM_PORT - Enum constant in enum class org.springframework.boot.test.context.SpringBootTest.WebEnvironment
-
Creates a web application context (reactive or servlet based) and sets a
server.port=0Environmentproperty (which usually triggers listening on a random port). - ReactiveWebApplicationContextRunner - Class in org.springframework.boot.test.context.runner
-
An
ApplicationContext runnerfor aConfigurableReactiveWebApplicationContext. - ReactiveWebApplicationContextRunner() - Constructor for class org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner
-
Create a new
ReactiveWebApplicationContextRunnerinstance using aAnnotationConfigReactiveWebApplicationContextas the underlying source. - ReactiveWebApplicationContextRunner(Supplier<ConfigurableReactiveWebApplicationContext>) - Constructor for class org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner
-
Create a new
ApplicationContextRunnerinstance using the specifiedcontextFactoryas the underlying source. - ReactiveWebApplicationContextRunner(Supplier<ConfigurableReactiveWebApplicationContext>, Class<?>...) - Constructor for class org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner
-
Create a new
ApplicationContextRunnerinstance using the specifiedcontextFactoryas the underlying source. - ReactiveWebMergedContextConfiguration - Class in org.springframework.boot.test.context
-
Encapsulates the merged context configuration declared on a test class and all of its superclasses for a reactive web application.
- ReactiveWebMergedContextConfiguration(MergedContextConfiguration) - Constructor for class org.springframework.boot.test.context.ReactiveWebMergedContextConfiguration
- read(File) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return
ObjectContentfrom reading from the specified file. - read(InputStream) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return
ObjectContentfrom reading from the specified input stream. - read(Reader) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return
ObjectContentfrom reading from the specified reader. - read(String) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return
ObjectContentfrom reading from the specified classpath resource. - read(Resource) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return
ObjectContentfrom reading from the specified resource. - readObject(File) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return the object created from reading from the specified file.
- readObject(InputStream) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return the object created from reading from the specified input stream.
- readObject(InputStream, ResolvableType) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Read from the specified input stream to create an object of the specified type.
- readObject(InputStream, ResolvableType) - Method in class org.springframework.boot.test.json.JacksonTester
- readObject(Reader) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return the object created from reading from the specified reader.
- readObject(Reader, ResolvableType) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Read from the specified reader to create an object of the specified type.
- readObject(Reader, ResolvableType) - Method in class org.springframework.boot.test.json.GsonTester
- readObject(Reader, ResolvableType) - Method in class org.springframework.boot.test.json.JacksonTester
- readObject(Reader, ResolvableType) - Method in class org.springframework.boot.test.json.JsonbTester
- readObject(String) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return the object created from reading from the specified classpath resource.
- readObject(Resource) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return the object created from reading from the specified resource.
- register(BeanDefinitionRegistry) - Static method in class org.springframework.boot.test.mock.mockito.MockitoPostProcessor
-
Deprecated.Register the processor with a
BeanDefinitionRegistry. - register(BeanDefinitionRegistry, Class<? extends MockitoPostProcessor>, Set<Definition>) - Static method in class org.springframework.boot.test.mock.mockito.MockitoPostProcessor
-
Deprecated.Register the processor with a
BeanDefinitionRegistry. - register(BeanDefinitionRegistry, Set<Definition>) - Static method in class org.springframework.boot.test.mock.mockito.MockitoPostProcessor
-
Deprecated.Register the processor with a
BeanDefinitionRegistry. - reset() - Element in annotation interface org.springframework.boot.test.mock.mockito.MockBean
-
Deprecated.The reset mode to apply to the mock bean.
- reset() - Element in annotation interface org.springframework.boot.test.mock.mockito.SpyBean
-
Deprecated.The reset mode to apply to the spied bean.
- reset() - Method in class org.springframework.boot.test.web.client.RootUriRequestExpectationManager
- ResetMocksTestExecutionListener - Class in org.springframework.boot.test.mock.mockito
-
Deprecated, for removal: This API element is subject to removal in a future version.since 3.4.0 for removal in 4.0.0 in favor of
MockitoResetTestExecutionListener - ResetMocksTestExecutionListener() - Constructor for class org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener
-
Deprecated.
- resolve(Object) - Method in class org.springframework.boot.test.mock.mockito.SpringBootMockResolver
-
Deprecated.
- resolveContextLoader(Class<?>, List<ContextConfigurationAttributes>) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
- resolveParameter(ParameterContext, ExtensionContext) - Method in class org.springframework.boot.test.system.OutputCaptureExtension
- RootUriRequestExpectationManager - Class in org.springframework.boot.test.web.client
-
RequestExpectationManagerthat strips the specified root URI from the request before verification. - RootUriRequestExpectationManager(String, RequestExpectationManager) - Constructor for class org.springframework.boot.test.web.client.RootUriRequestExpectationManager
- run(ContextConsumer<? super A>) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Create and refresh a new
ApplicationContextbased on the current state of this loader.
S
- serializable() - Element in annotation interface org.springframework.boot.test.mock.mockito.MockBean
-
Deprecated.If the generated mock is serializable.
- setBeanClassLoader(ClassLoader) - Method in class org.springframework.boot.test.mock.mockito.MockitoPostProcessor
-
Deprecated.
- setBeanFactory(BeanFactory) - Method in class org.springframework.boot.test.mock.mockito.MockitoPostProcessor
-
Deprecated.
- setBufferContent(boolean) - Method in class org.springframework.boot.test.web.client.MockServerRestClientCustomizer
-
Set if the
BufferingClientHttpRequestFactorywrapper should be used to buffer the input and output streams, and for example, allow multiple reads of the response body. - setBufferContent(boolean) - Method in class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
-
Set if the
BufferingClientHttpRequestFactorywrapper should be used to buffer the input and output streams, and for example, allow multiple reads of the response body. - setDetectRootUri(boolean) - Method in class org.springframework.boot.test.web.client.MockServerRestTemplateCustomizer
-
Set if root URIs from
RootUriRequestExpectationManagershould be detected and applied to theMockRestServiceServer. - setUriTemplateHandler(UriTemplateHandler) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Configure the
UriTemplateHandlerto use to expand URI templates. - SpringBootContextLoader - Class in org.springframework.boot.test.context
-
A
ContextLoaderthat can be used to test Spring Boot applications (those that normally startup usingSpringApplication). - SpringBootContextLoader() - Constructor for class org.springframework.boot.test.context.SpringBootContextLoader
- SpringBootMockResolver - Class in org.springframework.boot.test.mock.mockito
-
Deprecated, for removal: This API element is subject to removal in a future version.since 3.4.0 for removal in 4.0.0 in favor of Spring Framework's
MockitoBeanandMockitoSpyBean - SpringBootMockResolver() - Constructor for class org.springframework.boot.test.mock.mockito.SpringBootMockResolver
-
Deprecated.
- SpringBootMockServletContext - Class in org.springframework.boot.test.mock.web
-
MockServletContextimplementation for Spring Boot. - SpringBootMockServletContext(String) - Constructor for class org.springframework.boot.test.mock.web.SpringBootMockServletContext
- SpringBootMockServletContext(String, ResourceLoader) - Constructor for class org.springframework.boot.test.mock.web.SpringBootMockServletContext
- SpringBootTest - Annotation Interface in org.springframework.boot.test.context
-
Annotation that can be specified on a test class that runs Spring Boot based tests.
- SpringBootTest.UseMainMethod - Enum Class in org.springframework.boot.test.context
-
Enumeration of how the main method of the
@SpringBootConfiguration-annotated class is used when creating and running theSpringApplicationunder test. - SpringBootTest.WebEnvironment - Enum Class in org.springframework.boot.test.context
-
An enumeration web environment modes.
- SpringBootTestAotProcessor - Class in org.springframework.boot.test.context
-
Entry point for AOT processing of a Spring Boot application's tests.
- SpringBootTestAotProcessor(Set<Path>, AbstractAotProcessor.Settings) - Constructor for class org.springframework.boot.test.context.SpringBootTestAotProcessor
-
Create a new processor for the specified test classpath roots and general settings.
- SpringBootTestContextBootstrapper - Class in org.springframework.boot.test.context
-
TestContextBootstrapperfor Spring Boot. - SpringBootTestContextBootstrapper() - Constructor for class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
- SpyBean - Annotation Interface in org.springframework.boot.test.mock.mockito
-
Deprecated, for removal: This API element is subject to removal in a future version.since 3.4.0 for removal in 4.0.0 in favor of
MockitoSpyBean - SpyBeans - Annotation Interface in org.springframework.boot.test.mock.mockito
-
Deprecated, for removal: This API element is subject to removal in a future version.since 3.4.0 for removal in 4.0.0 in favor of
MockitoSpyBean - SSL - Enum constant in enum class org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption
-
Use a
TlsSocketStrategythat trusts self-signed certificates. - subSequence(int, int) - Method in interface org.springframework.boot.test.system.CapturedOutput
- supportsParameter(ParameterContext, ExtensionContext) - Method in class org.springframework.boot.test.system.OutputCaptureExtension
- SYSTEM_ENVIRONMENT - Enum constant in enum class org.springframework.boot.test.util.TestPropertyValues.Type
-
Used for
SystemEnvironmentPropertySource.
T
- test(String) - Method in class org.springframework.boot.test.context.FilteredClassLoader.ClassFilter
- test(String) - Method in class org.springframework.boot.test.context.FilteredClassLoader.ClassPathResourceFilter
- test(String) - Method in class org.springframework.boot.test.context.FilteredClassLoader.PackageFilter
- TestComponent - Annotation Interface in org.springframework.boot.test.context
-
@Componentthat can be used when a bean is intended only for tests, and should be excluded from Spring Boot's component scanning. - TestConfiguration - Annotation Interface in org.springframework.boot.test.context
-
@Configurationthat can be used to define additional beans or customizations for a test. - TestPropertyValues - Class in org.springframework.boot.test.util
-
Test utilities for adding properties.
- TestPropertyValues.Pair - Class in org.springframework.boot.test.util
-
A single name value pair.
- TestPropertyValues.Type - Enum Class in org.springframework.boot.test.util
-
The type of property source.
- TestRestTemplate - Class in org.springframework.boot.test.web.client
-
Convenient alternative of
RestTemplatethat is suitable for integration tests. - TestRestTemplate(String, String, TestRestTemplate.HttpClientOption...) - Constructor for class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new
TestRestTemplateinstance with the specified credentials. - TestRestTemplate(TestRestTemplate.HttpClientOption...) - Constructor for class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new
TestRestTemplateinstance. - TestRestTemplate(RestTemplateBuilder) - Constructor for class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new
TestRestTemplateinstance. - TestRestTemplate(RestTemplateBuilder, String, String, TestRestTemplate.HttpClientOption...) - Constructor for class org.springframework.boot.test.web.client.TestRestTemplate
-
Create a new
TestRestTemplateinstance with the specified credentials. - TestRestTemplate.CustomHttpComponentsClientHttpRequestFactory - Class in org.springframework.boot.test.web.client
-
HttpComponentsClientHttpRequestFactoryto apply customizations. - TestRestTemplate.HttpClientOption - Enum Class in org.springframework.boot.test.web.client
-
Options used to customize the Apache HTTP Client.
- toString() - Method in class org.springframework.boot.test.json.JsonContent
- toString() - Method in class org.springframework.boot.test.json.ObjectContent
- toString() - Method in class org.springframework.boot.test.system.OutputCaptureRule
U
- useMainMethod() - Element in annotation interface org.springframework.boot.test.context.SpringBootTest
-
The type of main method usage to employ when creating the
SpringApplicationunder test.
V
- validateRequest(ClientHttpRequest) - Method in class org.springframework.boot.test.web.client.RootUriRequestExpectationManager
- value() - Element in annotation interface org.springframework.boot.test.context.SpringBootTest
-
Alias for
SpringBootTest.properties(). - value() - Element in annotation interface org.springframework.boot.test.context.TestComponent
-
The value may indicate a suggestion for a logical component name, to be turned into a Spring bean in case of an auto-detected component.
- value() - Element in annotation interface org.springframework.boot.test.context.TestConfiguration
-
Explicitly specify the name of the Spring bean definition associated with this Configuration class.
- value() - Element in annotation interface org.springframework.boot.test.mock.mockito.MockBean
-
Deprecated.The classes to mock.
- value() - Element in annotation interface org.springframework.boot.test.mock.mockito.MockBeans
-
Deprecated.Return the contained
@MockBeanannotations. - value() - Element in annotation interface org.springframework.boot.test.mock.mockito.SpyBean
-
Deprecated.The classes to spy.
- value() - Element in annotation interface org.springframework.boot.test.mock.mockito.SpyBeans
-
Deprecated.Return the contained
@SpyBeanannotations. - valueOf(String) - Static method in enum class org.springframework.boot.test.context.assertj.ApplicationContextAssert.Scope
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.springframework.boot.test.context.SpringBootTest.UseMainMethod
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.springframework.boot.test.context.SpringBootTest.WebEnvironment
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.springframework.boot.test.mock.mockito.MockReset
-
Deprecated.Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.springframework.boot.test.util.TestPropertyValues.Type
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class org.springframework.boot.test.context.assertj.ApplicationContextAssert.Scope
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.springframework.boot.test.context.SpringBootTest.UseMainMethod
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.springframework.boot.test.context.SpringBootTest.WebEnvironment
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.springframework.boot.test.mock.mockito.MockReset
-
Deprecated.Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.springframework.boot.test.util.TestPropertyValues.Type
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.springframework.boot.test.web.client.TestRestTemplate.HttpClientOption
-
Returns an array containing the constants of this enum class, in the order they are declared.
- verify() - Method in class org.springframework.boot.test.web.client.RootUriRequestExpectationManager
- verify(Duration) - Method in class org.springframework.boot.test.web.client.RootUriRequestExpectationManager
- verifyConfiguration(Class<?>) - Method in class org.springframework.boot.test.context.SpringBootTestContextBootstrapper
W
- WebApplicationContextRunner - Class in org.springframework.boot.test.context.runner
-
An
ApplicationContext runnerfor a Servlet basedConfigurableWebApplicationContext. - WebApplicationContextRunner() - Constructor for class org.springframework.boot.test.context.runner.WebApplicationContextRunner
-
Create a new
WebApplicationContextRunnerinstance using anAnnotationConfigServletWebApplicationContextwith aMockServletContextas the underlying source. - WebApplicationContextRunner(Supplier<ConfigurableWebApplicationContext>) - Constructor for class org.springframework.boot.test.context.runner.WebApplicationContextRunner
-
Create a new
WebApplicationContextRunnerinstance using the specifiedcontextFactoryas the underlying source. - WebApplicationContextRunner(Supplier<ConfigurableWebApplicationContext>, Class<?>...) - Constructor for class org.springframework.boot.test.context.runner.WebApplicationContextRunner
-
Create a new
WebApplicationContextRunnerinstance using the specifiedcontextFactoryas the underlying source. - webEnvironment() - Element in annotation interface org.springframework.boot.test.context.SpringBootTest
-
The type of web environment to create when applicable.
- WebTestClientBuilderCustomizer - Interface in org.springframework.boot.test.web.reactive.server
-
A customizer that can be implemented by beans wishing to customize the
WebTestClient.Builderto fine-tine its auto-configuration before aWebTestClientis created. - WHEN_AVAILABLE - Enum constant in enum class org.springframework.boot.test.context.SpringBootTest.UseMainMethod
-
Use the
mainmethod when it is available. - with(Function<SELF, SELF>) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Apply customization to this runner.
- withAllowBeanDefinitionOverriding(boolean) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Specify if bean definition overriding, by registering a definition with the same name as an existing definition, should be allowed.
- withAllowCircularReferences(boolean) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Specify if circular references between beans should be allowed.
- withBasicAuth(String, String) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Creates a new
TestRestTemplatewith the same configuration as this one, except that it will send basic authorization headers using the givenusernameandpassword. - withBean(Class<T>, Object...) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Register the specified user bean with the
ApplicationContext. - withBean(Class<T>, Supplier<T>, BeanDefinitionCustomizer...) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Register the specified user bean with the
ApplicationContext. - withBean(String, Class<T>, Object...) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Register the specified user bean with the
ApplicationContext. - withBean(String, Class<T>, Supplier<T>, BeanDefinitionCustomizer...) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Register the specified user bean with the
ApplicationContext. - withClassLoader(ClassLoader) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Customize the
ClassLoaderthat theApplicationContextshould use for resource loading and bean class loading. - withConfiguration(Configurations) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Register the specified configuration classes with the
ApplicationContext. - withInitializer(ApplicationContextInitializer<? super C>) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Add an
ApplicationContextInitializerto be called when the context is created. - withMockServletContext(Supplier<ConfigurableWebApplicationContext>) - Static method in class org.springframework.boot.test.context.runner.WebApplicationContextRunner
-
Decorate the specified
contextFactoryto set aMockServletContexton each newly createdWebApplicationContext. - withParent(ApplicationContext) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Configure the
parentof theApplicationContext. - withPropertyValues(String...) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Add the specified
Environmentproperty pairs. - withRequestFactorySettings(UnaryOperator<ClientHttpRequestFactorySettings>) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Creates a new
TestRestTemplatewith the same configuration as this one, except that it will customize theClientHttpRequestFactorySettings. - withRequestFactorySettings(ClientHttpRequestFactorySettings) - Method in class org.springframework.boot.test.web.client.TestRestTemplate
-
Creates a new
TestRestTemplatewith the same configuration as this one, except that it will apply the givenClientHttpRequestFactorySettings. - withSettings(MockReset) - Static method in enum class org.springframework.boot.test.mock.mockito.MockReset
-
Deprecated.Create
settingsto be used with mocks where a specific reset should occur. - withSystemProperties(String...) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Add the specified
Systemproperty pairs. - withUserConfiguration(Class<?>...) - Method in class org.springframework.boot.test.context.runner.AbstractApplicationContextRunner
-
Register the specified user configuration classes with the
ApplicationContext. - write(T) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Return
JsonContentfrom writing the specific value. - writeObject(T, ResolvableType) - Method in class org.springframework.boot.test.json.AbstractJsonMarshalTester
-
Write the specified object to a JSON string.
- writeObject(T, ResolvableType) - Method in class org.springframework.boot.test.json.GsonTester
- writeObject(T, ResolvableType) - Method in class org.springframework.boot.test.json.JacksonTester
- writeObject(T, ResolvableType) - Method in class org.springframework.boot.test.json.JsonbTester
All Classes and Interfaces|All Packages|Serialized Form
AbstractApplicationContextRunner(Function, Supplier, Class...)