Package org.springframework.mock.env
@NullMarked
package org.springframework.mock.env
This package contains mock implementations of the
Environment and
PropertySource
abstractions.
These mocks are useful for developing out-of-container unit tests for code that depends on environment-specific properties.
-
ClassesClassDescriptionSimple
ConfigurableEnvironmentimplementation exposingMockEnvironment.setProperty(java.lang.String, java.lang.String)andMockEnvironment.withProperty(java.lang.String, java.lang.String)methods for testing purposes.SimplePropertySourceimplementation for use in testing.