"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "spring-beans/src/test/java/org/springframework/beans/factory/config/YamlProcessorTests.java" between
spring-framework-5.3.7.tar.gz and spring-framework-5.3.8.tar.gz

About: Spring Framework is an application framework for the Java platform and .NET Framework. Community edition.

YamlProcessorTests.java  (spring-framework-5.3.7):YamlProcessorTests.java  (spring-framework-5.3.8)
skipping to change at line 143 skipping to change at line 143
List<String> keysFromFlattenedMap = new ArrayList<>(flatt enedMap.keySet()); List<String> keysFromFlattenedMap = new ArrayList<>(flatt enedMap.keySet());
assertThat(keysFromProperties).containsExactlyInAnyOrderE lementsOf(keysFromFlattenedMap); assertThat(keysFromProperties).containsExactlyInAnyOrderE lementsOf(keysFromFlattenedMap);
// Keys in the Properties object are sorted. // Keys in the Properties object are sorted.
assertThat(keysFromProperties).containsExactly("bar.spam" , "cat", "foo"); assertThat(keysFromProperties).containsExactly("bar.spam" , "cat", "foo");
// But the flattened map retains the order from the input . // But the flattened map retains the order from the input .
assertThat(keysFromFlattenedMap).containsExactly("cat", " foo", "bar.spam"); assertThat(keysFromFlattenedMap).containsExactly("cat", " foo", "bar.spam");
}); });
} }
@Test @Test
@SuppressWarnings("unchecked")
void standardTypesSupportedByDefault() throws Exception { void standardTypesSupportedByDefault() throws Exception {
setYaml("value: !!set\n ? first\n ? second"); setYaml("value: !!set\n ? first\n ? second");
this.processor.process((properties, map) -> { this.processor.process((properties, map) -> {
assertThat(properties).containsExactly(entry("value[0]", "first"), entry("value[1]", "second")); assertThat(properties).containsExactly(entry("value[0]", "first"), entry("value[1]", "second"));
assertThat(map.get("value")).isInstanceOf(Set.class); assertThat(map.get("value")).isInstanceOf(Set.class);
Set<String> set = (Set<String>) map.get("value"); Set<String> set = (Set<String>) map.get("value");
assertThat(set).containsExactly("first", "second"); assertThat(set).containsExactly("first", "second");
}); });
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)