クラス MockEnvironment
java.lang.ObjectSE
org.springframework.core.env.AbstractEnvironment
org.springframework.mock.env.MockEnvironment
- 実装されているすべてのインターフェース:
ConfigurableEnvironment, ConfigurablePropertyResolver, Environment, PropertyResolver
テスト目的で
setProperty(String, Object) および withProperty(String, Object) メソッドを公開する単純な ConfigurableEnvironment 実装。- 導入:
- 3.2
- 作成者:
- Chris Beams, Sam Brannen
- 関連事項:
フィールドのサマリー
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明voidsetProperty(StringSE name, ObjectSE value) この環境の基礎となるMockPropertySourceにプロパティを設定します。withProperty(StringSE name, ObjectSE value) 現在のインスタンスを返すsetProperty(String, Object)の便利なシノニム。クラス AbstractEnvironment から継承されたメソッド
acceptsProfiles, acceptsProfiles, addActiveProfile, containsProperty, createPropertyResolver, customizePropertySources, doGetActiveProfiles, doGetActiveProfilesProperty, doGetDefaultProfiles, doGetDefaultProfilesProperty, getActiveProfiles, getConversionService, getDefaultProfiles, getProperty, getProperty, getProperty, getProperty, getPropertyResolver, getPropertySources, getRequiredProperty, getRequiredProperty, getReservedDefaultProfiles, getSystemEnvironment, getSystemProperties, isProfileActive, merge, resolvePlaceholders, resolveRequiredPlaceholders, setActiveProfiles, setConversionService, setDefaultProfiles, setEscapeCharacter, setIgnoreUnresolvableNestedPlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setRequiredProperties, setValueSeparator, suppressGetenvAccess, toString, validateProfile, validateRequiredPropertiesクラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース Environment から継承されたメソッド
matchesProfiles
コンストラクターの詳細
MockEnvironment
public MockEnvironment()単一のMockPropertySourceで新しいMockEnvironmentを作成します。
メソッドの詳細
setProperty
この環境の基礎となるMockPropertySourceにプロパティを設定します。- 導入:
- 6.2.8
- 関連事項:
withProperty
現在のインスタンスを返すsetProperty(String, Object)の便利なシノニム。メソッドの連鎖や Fluent スタイルの使用に役立ちます。
- 戻り値:
- この
MockEnvironmentインスタンス - 導入:
- 6.2.8
- 関連事項: