Skip to content

Commit

Permalink
Remove outdated reference to EnvironmentTestUtils
Browse files Browse the repository at this point in the history
Documentation still refers to the now deprecated `EnvironmentTestUtils`
class instead of `TestPropertyValues` for setting environment values in
tests.

This commit replaces it with `TestPropertyValues` and provides an
equivalent code example.

Closes spring-projectsgh-12711
  • Loading branch information
ruifigueira authored and snicoll committed Apr 3, 2018
1 parent 72cf471 commit 958aa5d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7160,14 +7160,14 @@ which auto-configures one for you.


[[boot-features-environment-test-utilities]]
==== EnvironmentTestUtils
`EnvironmentTestUtils` lets you quickly add properties to a
==== TestPropertyValues
`TestPropertyValues` lets you quickly add properties to a
`ConfigurableEnvironment` or `ConfigurableApplicationContext`. You can call it with
`key=value` strings, as follows:

[source,java,indent=0]
----
EnvironmentTestUtils.addEnvironment(env, "org=Spring", "name=Boot");
TestPropertyValues.of("org=Spring", "name=Boot").applyTo(env);
----


Expand Down

0 comments on commit 958aa5d

Please sign in to comment.