public class SpringBootTestContextBootstrapper
extends org.springframework.test.context.support.DefaultTestContextBootstrapper
TestContextBootstrapper
。@SpringBootTest
のサポートを提供し、直接またはサブクラス化して使用することもできます。DefaultTestContextBootstrapper
以上の次の機能を提供します。default context loader
として SpringBootContextLoader
を使用します。@SpringBootConfiguration
を自動的に検索します。Environment
getProperties(Class)
を定義できます。webEnvironment
モードをサポートします。SpringBootTest
, TestConfiguration
コンストラクターと説明 |
---|
SpringBootTestContextBootstrapper() |
修飾子と型 | メソッドと説明 |
---|---|
org.springframework.test.context.TestContext | buildTestContext() |
protected org.springframework.test.context.MergedContextConfiguration | createModifiedConfig(org.springframework.test.context.MergedContextConfiguration mergedConfig, ClassSE<?>[] classes) 異なるクラスで新しい MergedContextConfiguration を作成します。 |
protected org.springframework.test.context.MergedContextConfiguration | createModifiedConfig(org.springframework.test.context.MergedContextConfiguration mergedConfig, ClassSE<?>[] classes, StringSE[] propertySourceProperties) 異なるクラスとプロパティで新しい MergedContextConfiguration を作成します。 |
protected StringSE | determineResourceBasePath(org.springframework.test.context.MergedContextConfiguration configuration) 指定された configuration のテストクラスに @WebAppConfiguration (存在する場合)の値を使用して、Web アプリケーションのリソースベースパスを決定します。 |
protected SpringBootTest | getAnnotation(ClassSE<?> testClass) |
protected ClassSE<?>[] | getClasses(ClassSE<?> testClass) |
protected ClassSE<? extends org.springframework.test.context.ContextLoader> | getDefaultContextLoaderClass(ClassSE<?> testClass) |
protected SetSE<ClassSE<? extends org.springframework.test.context.TestExecutionListener>> | getDefaultTestExecutionListenerClasses() |
protected StringSE | getDifferentiatorPropertySourceProperty() "differentiator" プロパティを返して、通常のテストとブートストラップテストを区別する何かがあることを確認します。 |
protected ClassSE<?>[] | getOrFindConfigurationClasses(org.springframework.test.context.MergedContextConfiguration mergedConfig) |
protected StringSE[] | getProperties(ClassSE<?> testClass) |
protected SpringBootTest.WebEnvironment | getWebEnvironment(ClassSE<?> testClass) このテストの SpringBootTest.WebEnvironment 型を返すか、未定義の場合は null を返します。 |
protected org.springframework.test.context.MergedContextConfiguration | processMergedContextConfiguration(org.springframework.test.context.MergedContextConfiguration mergedConfig) |
protected void | processPropertySourceProperties(org.springframework.test.context.MergedContextConfiguration mergedConfig, ListSE<StringSE> propertySourceProperties) プロパティソースプロパティを後処理し、必要に応じて要素を追加または削除します。 |
protected org.springframework.test.context.ContextLoader | resolveContextLoader(ClassSE<?> testClass, ListSE<org.springframework.test.context.ContextConfigurationAttributes> configAttributesList) |
protected void | verifyConfiguration(ClassSE<?> testClass) |
buildMergedContextConfiguration, getBootstrapContext, getCacheAwareContextLoaderDelegate, getContextCustomizerFactories, getDefaultTestExecutionListenerClassNames, getTestExecutionListeners, resolveExplicitContextLoaderClass, setBootstrapContext
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public org.springframework.test.context.TestContext buildTestContext()
org.springframework.test.context.TestContextBootstrapper
の buildTestContext
org.springframework.test.context.support.AbstractTestContextBootstrapper
の buildTestContext
protected SetSE<ClassSE<? extends org.springframework.test.context.TestExecutionListener>> getDefaultTestExecutionListenerClasses()
org.springframework.test.context.support.AbstractTestContextBootstrapper
の getDefaultTestExecutionListenerClasses
protected org.springframework.test.context.ContextLoader resolveContextLoader(ClassSE<?> testClass, ListSE<org.springframework.test.context.ContextConfigurationAttributes> configAttributesList)
org.springframework.test.context.support.AbstractTestContextBootstrapper
の resolveContextLoader
protected ClassSE<? extends org.springframework.test.context.ContextLoader> getDefaultContextLoaderClass(ClassSE<?> testClass)
org.springframework.test.context.support.DefaultTestContextBootstrapper
の getDefaultContextLoaderClass
protected org.springframework.test.context.MergedContextConfiguration processMergedContextConfiguration(org.springframework.test.context.MergedContextConfiguration mergedConfig)
org.springframework.test.context.support.AbstractTestContextBootstrapper
の processMergedContextConfiguration
protected StringSE determineResourceBasePath(org.springframework.test.context.MergedContextConfiguration configuration)
configuration
のテストクラスに @WebAppConfiguration
(存在する場合)の値を使用して、Web アプリケーションのリソースベースパスを決定します。デフォルトでは、src/main/webapp
が存在しません。configuration
- 調べる構成 protected ClassSE<?>[] getOrFindConfigurationClasses(org.springframework.test.context.MergedContextConfiguration mergedConfig)
protected StringSE getDifferentiatorPropertySourceProperty()
null
protected void processPropertySourceProperties(org.springframework.test.context.MergedContextConfiguration mergedConfig, ListSE<StringSE> propertySourceProperties)
mergedConfig
- マージされたコンテキスト構成 propertySourceProperties
- 処理するプロパティソースプロパティ protected SpringBootTest.WebEnvironment getWebEnvironment(ClassSE<?> testClass)
SpringBootTest.WebEnvironment
型を返すか、未定義の場合は null を返します。testClass
- ソーステストクラス SpringBootTest.WebEnvironment
または null
protected SpringBootTest getAnnotation(ClassSE<?> testClass)
protected void verifyConfiguration(ClassSE<?> testClass)
protected final org.springframework.test.context.MergedContextConfiguration createModifiedConfig(org.springframework.test.context.MergedContextConfiguration mergedConfig, ClassSE<?>[] classes)
MergedContextConfiguration
を作成します。mergedConfig
- ソース構成 classes
- 置換クラス MergedContextConfiguration
protected final org.springframework.test.context.MergedContextConfiguration createModifiedConfig(org.springframework.test.context.MergedContextConfiguration mergedConfig, ClassSE<?>[] classes, StringSE[] propertySourceProperties)
MergedContextConfiguration
を作成します。mergedConfig
- ソース構成 classes
- 置換クラス propertySourceProperties
- 置換プロパティ MergedContextConfiguration
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.