From 08dbb2d8c46545838ad886a05b6599b2c005049a Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 11 Jun 2019 09:23:50 -0700 Subject: [PATCH] Polish --- ...IterableConfigurationPropertySourceTests.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/SpringIterableConfigurationPropertySourceTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/SpringIterableConfigurationPropertySourceTests.java index e9791c2e83..85f1ef9b26 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/SpringIterableConfigurationPropertySourceTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/source/SpringIterableConfigurationPropertySourceTests.java @@ -163,9 +163,9 @@ class SpringIterableConfigurationPropertySourceTests { EnumerablePropertySource source = new MapPropertySource("test", map); SpringIterableConfigurationPropertySource adapter = new SpringIterableConfigurationPropertySource(source, DefaultPropertyMapper.INSTANCE); - assertThat(adapter.stream().count()).isEqualTo(2); + assertThat(adapter.stream()).hasSize(2); map.put("key3", "value3"); - assertThat(adapter.stream().count()).isEqualTo(3); + assertThat(adapter.stream()).hasSize(3); } @Test @@ -177,10 +177,10 @@ class SpringIterableConfigurationPropertySourceTests { EnumerablePropertySource source = new MapPropertySource("test", map); SpringIterableConfigurationPropertySource adapter = new SpringIterableConfigurationPropertySource(source, DefaultPropertyMapper.INSTANCE); - assertThat(adapter.stream().count()).isEqualTo(2); + assertThat(adapter.stream()).hasSize(2); map.setThrowException(true); map.put("key3", "value3"); - assertThat(adapter.stream().count()).isEqualTo(3); + assertThat(adapter.stream()).hasSize(3); } @Test @@ -192,9 +192,9 @@ class SpringIterableConfigurationPropertySourceTests { EnumerablePropertySource source = new OriginTrackedMapPropertySource("test", map); SpringIterableConfigurationPropertySource adapter = new SpringIterableConfigurationPropertySource(source, DefaultPropertyMapper.INSTANCE); - assertThat(adapter.stream().count()).isEqualTo(2); + assertThat(adapter.stream()).hasSize(2); map.put("key3", "value3"); - assertThat(adapter.stream().count()).isEqualTo(3); + assertThat(adapter.stream()).hasSize(3); } @Test @@ -206,9 +206,9 @@ class SpringIterableConfigurationPropertySourceTests { EnumerablePropertySource source = new OriginTrackedMapPropertySource("test", map, true); SpringIterableConfigurationPropertySource adapter = new SpringIterableConfigurationPropertySource(source, DefaultPropertyMapper.INSTANCE); - assertThat(adapter.stream().count()).isEqualTo(2); + assertThat(adapter.stream()).hasSize(2); map.put("key3", "value3"); - assertThat(adapter.stream().count()).isEqualTo(2); + assertThat(adapter.stream()).hasSize(2); } /**