Upgrade to AssertJ 3.25.0
This commit is contained in:
@@ -23,6 +23,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.assertj.core.api.InstanceOfAssertFactories;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.yaml.snakeyaml.composer.ComposerException;
|
||||
import org.yaml.snakeyaml.parser.ParserException;
|
||||
@@ -145,10 +146,11 @@ class YamlProcessorTests {
|
||||
void standardTypesSupportedByDefault() {
|
||||
setYaml("value: !!set\n ? first\n ? second");
|
||||
this.processor.process((properties, map) -> {
|
||||
assertThat(properties).containsExactly(entry("value[0]", "first"), entry("value[1]", "second"));
|
||||
assertThat(map.get("value")).isInstanceOf(Set.class);
|
||||
Set<String> set = (Set<String>) map.get("value");
|
||||
assertThat(set).containsExactly("first", "second");
|
||||
// Assert on Properties as a Map due to bug in AssertJ 3.25.0
|
||||
Map<Object, Object> propsAsMap = new LinkedHashMap<>(properties);
|
||||
assertThat(propsAsMap).containsExactly(entry("value[0]", "first"), entry("value[1]", "second"));
|
||||
assertThat(map.get("value")).asInstanceOf(InstanceOfAssertFactories.type(Set.class))
|
||||
.satisfies(set -> assertThat(set).containsExactly("first", "second"));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user