Polish "Use idiomatic AssertJ map assertions"
See gh-31752
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -189,8 +189,7 @@ class SelectionAndProjectionTests {
|
||||
|
||||
Expression exp = parser.parseExpression("colors.^[key.startsWith('b')]");
|
||||
Map<String, String> colorsMap = (Map<String, String>) exp.getValue(context);
|
||||
assertThat(colorsMap).hasSize(1);
|
||||
assertThat(colorsMap.keySet().iterator().next()).isEqualTo("beige");
|
||||
assertThat(colorsMap).containsOnlyKeys("beige");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -201,8 +200,7 @@ class SelectionAndProjectionTests {
|
||||
|
||||
Expression exp = parser.parseExpression("colors.$[key.startsWith('b')]");
|
||||
Map<String, String> colorsMap = (Map<String, String>) exp.getValue(context);
|
||||
assertThat(colorsMap).hasSize(1);
|
||||
assertThat(colorsMap.keySet().iterator().next()).isEqualTo("brown");
|
||||
assertThat(colorsMap).containsOnlyKeys("brown");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user