Fix binding random properties test

See gh-26201
pull/26253/head
Phillip Webb 4 years ago
parent ba5b36d733
commit 1e0a3a946d

@ -1067,7 +1067,7 @@ class ConfigurationPropertiesTests {
MutablePropertySources sources = this.context.getEnvironment().getPropertySources(); MutablePropertySources sources = this.context.getEnvironment().getPropertySources();
sources.addFirst(new RandomValuePropertySource()); sources.addFirst(new RandomValuePropertySource());
Map<String, Object> source = new HashMap<>(); Map<String, Object> source = new HashMap<>();
source.put("com.example.bar", "${random.int}"); source.put("com.example.bar", "${random.int[100,200]}");
sources.addLast(new MapPropertySource("test", source)); sources.addLast(new MapPropertySource("test", source));
load(SimplePrefixedProperties.class); load(SimplePrefixedProperties.class);
SimplePrefixedProperties bean = this.context.getBean(SimplePrefixedProperties.class); SimplePrefixedProperties bean = this.context.getBean(SimplePrefixedProperties.class);

Loading…
Cancel
Save