Skip to content

Commit 2d345f5

Browse files
committed
Improve AnnotationContainerTests assertion
Signed-off-by: sijun-yang <[email protected]>
1 parent 5eac75e commit 2d345f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

initializr-generator/src/test/java/io/spring/initializr/generator/language/AnnotationContainerTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ void addWithDifferentNamesAddsTwoAnnotations() {
117117
container.add("test-2", TEST_CLASS_NAME, (annotation) -> annotation.set("id", 2));
118118
assertThat(container.values()).satisfiesExactlyInAnyOrder(
119119
(a) -> assertThat(a.getAttributes()).singleElement()
120+
.satisfies((attribute) -> assertThat(attribute.getName()).isEqualTo("id"))
120121
.satisfies((attribute) -> assertThat(attribute.getValues()).containsOnly(1)),
121122
(a) -> assertThat(a.getAttributes()).singleElement()
123+
.satisfies((attribute) -> assertThat(attribute.getName()).isEqualTo("id"))
122124
.satisfies((attribute) -> assertThat(attribute.getValues()).containsOnly(2)));
123125
}
124126

0 commit comments

Comments
 (0)