From 169015fb3bfdc059a2b29d544b89c41c26984ead Mon Sep 17 00:00:00 2001 From: Peter-Josef Meisch Date: Thu, 21 Jan 2021 21:09:18 +0100 Subject: [PATCH] Fix assertions to assertj. --- .../core/SearchAsYouTypeTests.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeTests.java b/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeTests.java index a6802c7a..c03c3cd9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeTests.java @@ -15,7 +15,7 @@ */ package org.springframework.data.elasticsearch.core; -import static org.junit.jupiter.api.Assertions.*; +import static org.assertj.core.api.Assertions.*; import lombok.AllArgsConstructor; import lombok.Builder; @@ -109,9 +109,9 @@ public class SearchAsYouTypeTests { .collect(Collectors.toList()); // then - assertEquals(2, result.size()); - assertTrue(result.contains(new SearchAsYouTypeEntity("1"))); - assertTrue(result.contains(new SearchAsYouTypeEntity("2"))); + assertThat(result).hasSize(2); + assertThat(result).contains(new SearchAsYouTypeEntity("1")); + assertThat(result).contains(new SearchAsYouTypeEntity("2")); } @Test // DATAES-773 @@ -131,9 +131,9 @@ public class SearchAsYouTypeTests { .collect(Collectors.toList()); // then - assertEquals(2, result.size()); - assertTrue(result.contains(new SearchAsYouTypeEntity("2"))); - assertTrue(result.contains(new SearchAsYouTypeEntity("3"))); + assertThat(result).hasSize(2); + assertThat(result).contains(new SearchAsYouTypeEntity("2")); + assertThat(result).contains(new SearchAsYouTypeEntity("3")); } @Test // DATAES-773 @@ -153,8 +153,8 @@ public class SearchAsYouTypeTests { .collect(Collectors.toList()); // then - assertEquals(1, result.size()); - assertTrue(result.contains(new SearchAsYouTypeEntity("4"))); + assertThat(result).hasSize(1); + assertThat(result).contains(new SearchAsYouTypeEntity("4")); } /**