From c69452ecdcd397e0a02391251651be540a4e2ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20GREFFIER?= Date: Mon, 5 Aug 2024 16:51:11 +0200 Subject: [PATCH] Fix typos in unit tests (#883) --- .../api/CategoryParametersServiceTest.java | 3 +- .../service/api/ProjectWidgetServiceTest.java | 5 +-- .../suricate/service/api/UserServiceTest.java | 9 ++-- .../service/mapper/CategoryMapperTest.java | 5 +-- .../service/mapper/ProjectGridMapperTest.java | 17 ++++--- .../service/mapper/ProjectMapperTest.java | 45 +++++++++---------- .../service/mapper/UserMapperTest.java | 3 +- .../service/mapper/UserSettingMapperTest.java | 5 +-- .../service/mapper/WidgetMapperTest.java | 19 ++++---- .../mapper/WidgetParamValueMapperTest.java | 4 +- .../suricate/util/WidgetUtilsTest.java | 13 +++--- 11 files changed, 59 insertions(+), 69 deletions(-) diff --git a/src/test/java/com/michelin/suricate/service/api/CategoryParametersServiceTest.java b/src/test/java/com/michelin/suricate/service/api/CategoryParametersServiceTest.java index 8475b344d..428943b09 100644 --- a/src/test/java/com/michelin/suricate/service/api/CategoryParametersServiceTest.java +++ b/src/test/java/com/michelin/suricate/service/api/CategoryParametersServiceTest.java @@ -16,7 +16,6 @@ import java.util.Collections; import java.util.List; import java.util.Optional; -import org.assertj.core.api.Assertions; import org.jasypt.encryption.StringEncryptor; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -236,7 +235,7 @@ void shouldConvertCategoryParametersToWidgetParameters() { assertThat(widgetParam.getName()).isEqualTo("key"); assertThat(widgetParam.getDefaultValue()).isEqualTo("value"); - Assertions.assertThat(widgetParam.getType()).isEqualTo(DataTypeEnum.TEXT); + assertThat(widgetParam.getType()).isEqualTo(DataTypeEnum.TEXT); assertThat(widgetParam.getDescription()).isEqualTo("key"); assertThat(widgetParam.isRequired()).isTrue(); } diff --git a/src/test/java/com/michelin/suricate/service/api/ProjectWidgetServiceTest.java b/src/test/java/com/michelin/suricate/service/api/ProjectWidgetServiceTest.java index 233f1478c..f05f4a7bf 100644 --- a/src/test/java/com/michelin/suricate/service/api/ProjectWidgetServiceTest.java +++ b/src/test/java/com/michelin/suricate/service/api/ProjectWidgetServiceTest.java @@ -31,7 +31,6 @@ import java.util.Date; import java.util.List; import java.util.Optional; -import org.assertj.core.api.Assertions; import org.jasypt.encryption.StringEncryptor; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -296,7 +295,7 @@ void shouldUpdateStateNoDate() { projectWidgetService.updateState(WidgetStateEnum.STOPPED, 1L); - Assertions.assertThat(projectWidget.getState()) + assertThat(projectWidget.getState()) .isEqualTo(WidgetStateEnum.STOPPED); verify(projectWidgetRepository) @@ -334,7 +333,7 @@ void shouldUpdateState() { Date now = Date.from(Instant.parse("2000-01-01T01:00:00.00Z")); projectWidgetService.updateState(WidgetStateEnum.STOPPED, 1L, now); - Assertions.assertThat(projectWidget.getState()) + assertThat(projectWidget.getState()) .isEqualTo(WidgetStateEnum.STOPPED); assertThat(projectWidget.getLastExecutionDate()) .isEqualTo(now); diff --git a/src/test/java/com/michelin/suricate/service/api/UserServiceTest.java b/src/test/java/com/michelin/suricate/service/api/UserServiceTest.java index 0249a5a14..9fa49efdc 100644 --- a/src/test/java/com/michelin/suricate/service/api/UserServiceTest.java +++ b/src/test/java/com/michelin/suricate/service/api/UserServiceTest.java @@ -21,7 +21,6 @@ import java.util.Collections; import java.util.Optional; import java.util.Set; -import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mapstruct.factory.Mappers; @@ -189,7 +188,7 @@ void shouldRegisterUser() { .isEqualTo("email"); assertThat(actual.getAvatarUrl()) .isEqualTo("avatar"); - Assertions.assertThat(actual.getAuthenticationMethod()) + assertThat(actual.getAuthenticationMethod()) .isEqualTo(AuthenticationProvider.LDAP); assertThat(actual.getRoles()) .contains(role); @@ -256,7 +255,7 @@ void shouldRegisterUserUsernameAlreadyTaken() { .isEqualTo("email"); assertThat(actual.getAvatarUrl()) .isEqualTo("avatar"); - Assertions.assertThat(actual.getAuthenticationMethod()) + assertThat(actual.getAuthenticationMethod()) .isEqualTo(AuthenticationProvider.LDAP); assertThat(actual.getRoles()) .contains(role); @@ -327,7 +326,7 @@ void shouldUpdateRegisteredUser() { .isEqualTo("email"); assertThat(actual.getAvatarUrl()) .isEqualTo("avatar"); - Assertions.assertThat(actual.getAuthenticationMethod()) + assertThat(actual.getAuthenticationMethod()) .isEqualTo(AuthenticationProvider.LDAP); assertThat(actual.getRoles()) .contains(role); @@ -384,7 +383,7 @@ void shouldUpdate() { .isEqualTo("email"); assertThat(actual.getAvatarUrl()) .isEqualTo("avatar"); - Assertions.assertThat(actual.getAuthenticationMethod()) + assertThat(actual.getAuthenticationMethod()) .isEqualTo(AuthenticationProvider.LDAP); assertThat(actual.getRoles()) .contains(role); diff --git a/src/test/java/com/michelin/suricate/service/mapper/CategoryMapperTest.java b/src/test/java/com/michelin/suricate/service/mapper/CategoryMapperTest.java index f4bbb5caf..eda05e567 100644 --- a/src/test/java/com/michelin/suricate/service/mapper/CategoryMapperTest.java +++ b/src/test/java/com/michelin/suricate/service/mapper/CategoryMapperTest.java @@ -12,7 +12,6 @@ import com.michelin.suricate.model.enumeration.DataTypeEnum; import com.michelin.suricate.util.IdUtils; import java.util.Collections; -import org.assertj.core.api.Assertions; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -103,7 +102,7 @@ void shouldToCategoryParameterDto() { assertThat(actual.getKey()).isEqualTo("key"); assertThat(actual.getValue()).isEqualTo("value"); - Assertions.assertThat(actual.getDataType()).isEqualTo(DataTypeEnum.TEXT); + assertThat(actual.getDataType()).isEqualTo(DataTypeEnum.TEXT); assertThat(actual.isExport()).isTrue(); assertThat(actual.getDescription()).isEqualTo("description"); @@ -129,7 +128,7 @@ void shouldToCategoryParameterWithHiddenValuesDto() { assertThat(actual.getKey()).isEqualTo("key"); assertThat(actual.getValue()).isEqualTo("value"); - Assertions.assertThat(actual.getDataType()).isEqualTo(DataTypeEnum.TEXT); + assertThat(actual.getDataType()).isEqualTo(DataTypeEnum.TEXT); assertThat(actual.isExport()).isTrue(); assertThat(actual.getDescription()).isEqualTo("description"); assertThat(actual.getCategory()).isNull(); diff --git a/src/test/java/com/michelin/suricate/service/mapper/ProjectGridMapperTest.java b/src/test/java/com/michelin/suricate/service/mapper/ProjectGridMapperTest.java index 61e9f6c49..9cc1808e8 100644 --- a/src/test/java/com/michelin/suricate/service/mapper/ProjectGridMapperTest.java +++ b/src/test/java/com/michelin/suricate/service/mapper/ProjectGridMapperTest.java @@ -16,7 +16,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Date; -import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; @@ -56,10 +55,10 @@ void shouldToProjectGridEntity() { assertThat(actual.getTime()).isEqualTo(60); assertThat(actual.getProject()).isEqualTo(project); - Assertions.assertThat(actual.getCreatedBy()).isEqualTo("createdBy"); - Assertions.assertThat(actual.getCreatedDate()).isEqualTo(Date.from(Instant.parse("2000-01-01T01:00:00.00Z"))); - Assertions.assertThat(actual.getLastModifiedBy()).isEqualTo("lastModifiedBy"); - Assertions.assertThat(actual.getLastModifiedDate()) + assertThat(actual.getCreatedBy()).isEqualTo("createdBy"); + assertThat(actual.getCreatedDate()).isEqualTo(Date.from(Instant.parse("2000-01-01T01:00:00.00Z"))); + assertThat(actual.getLastModifiedBy()).isEqualTo("lastModifiedBy"); + assertThat(actual.getLastModifiedDate()) .isEqualTo(Date.from(Instant.parse("2000-01-01T01:00:00.00Z"))); } @@ -100,10 +99,10 @@ void shouldToImportExportProjectGridDto() { assertThat(actual.getTime()).isEqualTo(10); assertThat(actual.getWidgets().get(0).getWidgetTechnicalName()).isEqualTo("technicalName"); assertThat(actual.getWidgets().get(0).getBackendConfig()).isEqualTo("key=value"); - Assertions.assertThat(actual.getWidgets().get(0).getWidgetPosition().getGridColumn()).isEqualTo(1); - Assertions.assertThat(actual.getWidgets().get(0).getWidgetPosition().getGridRow()).isEqualTo(1); - Assertions.assertThat(actual.getWidgets().get(0).getWidgetPosition().getHeight()).isEqualTo(1); - Assertions.assertThat(actual.getWidgets().get(0).getWidgetPosition().getWidth()).isEqualTo(1); + assertThat(actual.getWidgets().get(0).getWidgetPosition().getGridColumn()).isEqualTo(1); + assertThat(actual.getWidgets().get(0).getWidgetPosition().getGridRow()).isEqualTo(1); + assertThat(actual.getWidgets().get(0).getWidgetPosition().getHeight()).isEqualTo(1); + assertThat(actual.getWidgets().get(0).getWidgetPosition().getWidth()).isEqualTo(1); } @Test diff --git a/src/test/java/com/michelin/suricate/service/mapper/ProjectMapperTest.java b/src/test/java/com/michelin/suricate/service/mapper/ProjectMapperTest.java index 3f9e2f727..7ea65e639 100644 --- a/src/test/java/com/michelin/suricate/service/mapper/ProjectMapperTest.java +++ b/src/test/java/com/michelin/suricate/service/mapper/ProjectMapperTest.java @@ -21,7 +21,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.assertj.core.api.Assertions; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -125,12 +124,12 @@ void shouldToProjectDto() { assertThat(actual.getGridProperties().getMaxColumn()).isEqualTo(1); assertThat(actual.getGridProperties().getWidgetHeight()).isEqualTo(1); assertThat(actual.getGridProperties().getCssStyle()).isEqualTo("style"); - Assertions.assertThat(actual.getImage().getId()).isEqualTo(1L); - Assertions.assertThat(actual.getImage().getContent()).isEqualTo(new byte[10]); - Assertions.assertThat(actual.getImage().getSize()).isEqualTo(10); - Assertions.assertThat(actual.getImage().getContentType()).isEqualTo("contentType"); - Assertions.assertThat(actual.getGrids().get(0).getId()).isEqualTo(1L); - Assertions.assertThat(actual.getGrids().get(0).getTime()).isEqualTo(10); + assertThat(actual.getImage().getId()).isEqualTo(1L); + assertThat(actual.getImage().getContent()).isEqualTo(new byte[10]); + assertThat(actual.getImage().getSize()).isEqualTo(10); + assertThat(actual.getImage().getContentType()).isEqualTo("contentType"); + assertThat(actual.getGrids().get(0).getId()).isEqualTo(1L); + assertThat(actual.getGrids().get(0).getTime()).isEqualTo(10); } } @@ -182,12 +181,12 @@ void shouldToProjectDtoNoLibrary() { assertThat(actual.getGridProperties().getMaxColumn()).isEqualTo(1); assertThat(actual.getGridProperties().getWidgetHeight()).isEqualTo(1); assertThat(actual.getGridProperties().getCssStyle()).isEqualTo("style"); - Assertions.assertThat(actual.getImage().getId()).isEqualTo(1L); - Assertions.assertThat(actual.getImage().getContent()).isEqualTo(new byte[10]); - Assertions.assertThat(actual.getImage().getSize()).isEqualTo(10); - Assertions.assertThat(actual.getImage().getContentType()).isEqualTo("contentType"); - Assertions.assertThat(actual.getGrids().get(0).getId()).isEqualTo(1L); - Assertions.assertThat(actual.getGrids().get(0).getTime()).isEqualTo(10); + assertThat(actual.getImage().getId()).isEqualTo(1L); + assertThat(actual.getImage().getContent()).isEqualTo(new byte[10]); + assertThat(actual.getImage().getSize()).isEqualTo(10); + assertThat(actual.getImage().getContentType()).isEqualTo("contentType"); + assertThat(actual.getGrids().get(0).getId()).isEqualTo(1L); + assertThat(actual.getGrids().get(0).getTime()).isEqualTo(10); } } @@ -228,7 +227,7 @@ void shouldToProjectDtoNoAsset() { assertThat(actual.getGridProperties().getMaxColumn()).isEqualTo(1); assertThat(actual.getGridProperties().getWidgetHeight()).isEqualTo(1); assertThat(actual.getGridProperties().getCssStyle()).isEqualTo("style"); - Assertions.assertThat(actual.getImage()).isNull(); + assertThat(actual.getImage()).isNull(); } @Test @@ -279,12 +278,12 @@ void shouldToProjectsDtos() { assertThat(actual.get(0).getGridProperties().getMaxColumn()).isEqualTo(1); assertThat(actual.get(0).getGridProperties().getWidgetHeight()).isEqualTo(1); assertThat(actual.get(0).getGridProperties().getCssStyle()).isEqualTo("style"); - Assertions.assertThat(actual.get(0).getImage().getId()).isEqualTo(1L); - Assertions.assertThat(actual.get(0).getImage().getContent()).isEqualTo(new byte[10]); - Assertions.assertThat(actual.get(0).getImage().getSize()).isEqualTo(10); - Assertions.assertThat(actual.get(0).getImage().getContentType()).isEqualTo("contentType"); - Assertions.assertThat(actual.get(0).getGrids().get(0).getId()).isEqualTo(1L); - Assertions.assertThat(actual.get(0).getGrids().get(0).getTime()).isEqualTo(10); + assertThat(actual.get(0).getImage().getId()).isEqualTo(1L); + assertThat(actual.get(0).getImage().getContent()).isEqualTo(new byte[10]); + assertThat(actual.get(0).getImage().getSize()).isEqualTo(10); + assertThat(actual.get(0).getImage().getContentType()).isEqualTo("contentType"); + assertThat(actual.get(0).getGrids().get(0).getId()).isEqualTo(1L); + assertThat(actual.get(0).getGrids().get(0).getTime()).isEqualTo(10); } } @@ -344,9 +343,9 @@ void shouldToImportExportProjectDto() { assertThat(actual.getName()).isEqualTo("name"); assertThat(actual.getToken()).isEqualTo("token"); assertThat(actual.isDisplayProgressBar()).isTrue(); - Assertions.assertThat(actual.getGridProperties().getMaxColumn()).isEqualTo(1); - Assertions.assertThat(actual.getGridProperties().getWidgetHeight()).isEqualTo(1); - Assertions.assertThat(actual.getGridProperties().getCssStyle()).isEqualTo("style"); + assertThat(actual.getGridProperties().getMaxColumn()).isEqualTo(1); + assertThat(actual.getGridProperties().getWidgetHeight()).isEqualTo(1); + assertThat(actual.getGridProperties().getCssStyle()).isEqualTo("style"); assertThat(actual.getImage().getContent()).isEqualTo(new byte[10]); assertThat(actual.getImage().getContentType()).isEqualTo("contentType"); assertThat(actual.getImage().getSize()).isEqualTo(10); diff --git a/src/test/java/com/michelin/suricate/service/mapper/UserMapperTest.java b/src/test/java/com/michelin/suricate/service/mapper/UserMapperTest.java index 512cd320b..8b35e5604 100644 --- a/src/test/java/com/michelin/suricate/service/mapper/UserMapperTest.java +++ b/src/test/java/com/michelin/suricate/service/mapper/UserMapperTest.java @@ -14,7 +14,6 @@ import com.michelin.suricate.model.enumeration.UserRoleEnum; import java.util.Collections; import java.util.List; -import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; @@ -61,7 +60,7 @@ void shouldToAdminUserDto() { assertThat(actual.getFirstname()).isEqualTo("firstname"); assertThat(actual.getLastname()).isEqualTo("lastname"); assertThat(actual.getUsername()).isEqualTo("username"); - Assertions.assertThat(actual.getRoles().get(0)).isEqualTo(roleResponseDto); + assertThat(actual.getRoles().get(0)).isEqualTo(roleResponseDto); } @Test diff --git a/src/test/java/com/michelin/suricate/service/mapper/UserSettingMapperTest.java b/src/test/java/com/michelin/suricate/service/mapper/UserSettingMapperTest.java index e8f9e908b..f104e1697 100644 --- a/src/test/java/com/michelin/suricate/service/mapper/UserSettingMapperTest.java +++ b/src/test/java/com/michelin/suricate/service/mapper/UserSettingMapperTest.java @@ -13,7 +13,6 @@ import com.michelin.suricate.model.entity.UserSetting; import java.util.Collections; import java.util.List; -import org.assertj.core.api.Assertions; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -51,7 +50,7 @@ void shouldToUserSettingDto() { assertThat(actual.getUserId()).isEqualTo(1L); assertThat(actual.getUnconstrainedValue()).isEqualTo("value"); assertThat(actual.getSetting()).isEqualTo(settingResponseDto); - Assertions.assertThat(actual.getSettingValue()).isEqualTo(allowedSettingValueResponseDto); + assertThat(actual.getSettingValue()).isEqualTo(allowedSettingValueResponseDto); } @Test @@ -74,7 +73,7 @@ void shouldToUserSettingsDtos() { assertThat(actual.get(0).getUserId()).isEqualTo(1L); assertThat(actual.get(0).getUnconstrainedValue()).isEqualTo("value"); assertThat(actual.get(0).getSetting()).isEqualTo(settingResponseDto); - Assertions.assertThat(actual.get(0).getSettingValue()).isEqualTo(allowedSettingValueResponseDto); + assertThat(actual.get(0).getSettingValue()).isEqualTo(allowedSettingValueResponseDto); } @NotNull diff --git a/src/test/java/com/michelin/suricate/service/mapper/WidgetMapperTest.java b/src/test/java/com/michelin/suricate/service/mapper/WidgetMapperTest.java index 996910dfd..d2f0e61ab 100644 --- a/src/test/java/com/michelin/suricate/service/mapper/WidgetMapperTest.java +++ b/src/test/java/com/michelin/suricate/service/mapper/WidgetMapperTest.java @@ -17,7 +17,6 @@ import com.michelin.suricate.util.IdUtils; import java.util.Collections; import java.util.List; -import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; @@ -37,7 +36,7 @@ class WidgetMapperTest { private WidgetMapperImpl widgetMapper; @Test - void shouldtoWidgetDto() { + void shouldConvertToWidgetDto() { try (MockedStatic mocked = mockStatic(IdUtils.class)) { Asset asset = new Asset(); asset.setId(1L); @@ -91,16 +90,16 @@ void shouldtoWidgetDto() { assertThat(actual.getTimeout()).isEqualTo(1L); assertThat(actual.getWidgetAvailability()).isEqualTo(WidgetAvailabilityEnum.ACTIVATED); assertThat(actual.getImageToken()).isEqualTo("encrypted"); - Assertions.assertThat(actual.getImage()).isNull(); + assertThat(actual.getImage()).isNull(); assertThat(actual.getLibraryTechnicalNames()).isNull(); - Assertions.assertThat(actual.getCategory()).isEqualTo(categoryResponseDto); + assertThat(actual.getCategory()).isEqualTo(categoryResponseDto); assertThat(actual.getRepositoryId()).isEqualTo(1L); assertThat(actual.getParams().get(0)).isEqualTo(widgetParamResponseDto); } } @Test - void shouldtoWidgetWithoutCategoryParametersDto() { + void shouldConvertToWidgetWithoutCategoryParametersDto() { try (MockedStatic mocked = mockStatic(IdUtils.class)) { Asset asset = new Asset(); asset.setId(1L); @@ -154,16 +153,16 @@ void shouldtoWidgetWithoutCategoryParametersDto() { assertThat(actual.getTimeout()).isEqualTo(1L); assertThat(actual.getWidgetAvailability()).isEqualTo(WidgetAvailabilityEnum.ACTIVATED); assertThat(actual.getImageToken()).isEqualTo("encrypted"); - Assertions.assertThat(actual.getImage()).isNull(); + assertThat(actual.getImage()).isNull(); assertThat(actual.getLibraryTechnicalNames()).isNull(); - Assertions.assertThat(actual.getCategory()).isEqualTo(categoryResponseDto); + assertThat(actual.getCategory()).isEqualTo(categoryResponseDto); assertThat(actual.getRepositoryId()).isEqualTo(1L); assertThat(actual.getParams().get(0)).isEqualTo(widgetParamResponseDto); } } @Test - void shouldtoWidgetsDtos() { + void shouldConvertToWidgetsDtos() { try (MockedStatic mocked = mockStatic(IdUtils.class)) { Asset asset = new Asset(); asset.setId(1L); @@ -217,9 +216,9 @@ void shouldtoWidgetsDtos() { assertThat(actual.get(0).getTimeout()).isEqualTo(1L); assertThat(actual.get(0).getWidgetAvailability()).isEqualTo(WidgetAvailabilityEnum.ACTIVATED); assertThat(actual.get(0).getImageToken()).isEqualTo("encrypted"); - Assertions.assertThat(actual.get(0).getImage()).isNull(); + assertThat(actual.get(0).getImage()).isNull(); assertThat(actual.get(0).getLibraryTechnicalNames()).isNull(); - Assertions.assertThat(actual.get(0).getCategory()).isEqualTo(categoryResponseDto); + assertThat(actual.get(0).getCategory()).isEqualTo(categoryResponseDto); assertThat(actual.get(0).getRepositoryId()).isEqualTo(1L); assertThat(actual.get(0).getParams().get(0)).isEqualTo(widgetParamResponseDto); } diff --git a/src/test/java/com/michelin/suricate/service/mapper/WidgetParamValueMapperTest.java b/src/test/java/com/michelin/suricate/service/mapper/WidgetParamValueMapperTest.java index 289686558..11956a327 100644 --- a/src/test/java/com/michelin/suricate/service/mapper/WidgetParamValueMapperTest.java +++ b/src/test/java/com/michelin/suricate/service/mapper/WidgetParamValueMapperTest.java @@ -17,7 +17,7 @@ class WidgetParamValueMapperTest { private WidgetParamValueMapperImpl widgetParamValueMapper; @Test - void shouldtoWidgetParameterValueDto() { + void shouldConvertToWidgetParameterValueDto() { WidgetParamValue widgetParamValue = new WidgetParamValue(); widgetParamValue.setId(1L); widgetParamValue.setJsKey("key"); @@ -30,7 +30,7 @@ void shouldtoWidgetParameterValueDto() { } @Test - void shouldtoWidgetParameterValuesDtos() { + void shouldConvertToWidgetParameterValuesDtos() { WidgetParamValue widgetParamValue = new WidgetParamValue(); widgetParamValue.setId(1L); widgetParamValue.setJsKey("key"); diff --git a/src/test/java/com/michelin/suricate/util/WidgetUtilsTest.java b/src/test/java/com/michelin/suricate/util/WidgetUtilsTest.java index b6dc65573..e5b3ed081 100644 --- a/src/test/java/com/michelin/suricate/util/WidgetUtilsTest.java +++ b/src/test/java/com/michelin/suricate/util/WidgetUtilsTest.java @@ -11,7 +11,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; class WidgetUtilsTest { @@ -78,7 +77,7 @@ void shouldParseCategoriesFolderAndGetGitHub() { assertThat(gitHubConfig.get(0).getId()).isEqualTo("WIDGET_CONFIG_GITHUB_TOKEN"); assertThat(gitHubConfig.get(0).getValue()).isNull(); assertThat(gitHubConfig.get(0).getDescription()).isEqualTo("Token for the GitHub API"); - Assertions.assertThat(gitHubConfig.get(0).getDataType()).isEqualTo(DataTypeEnum.PASSWORD); + assertThat(gitHubConfig.get(0).getDataType()).isEqualTo(DataTypeEnum.PASSWORD); } @Test @@ -171,24 +170,24 @@ void shouldGetCategory() throws IOException { assertThat(gitHubConfig.get(0).getId()).isEqualTo("WIDGET_CONFIG_GITHUB_TOKEN"); assertThat(gitHubConfig.get(0).getValue()).isNull(); assertThat(gitHubConfig.get(0).getDescription()).isEqualTo("Token for the GitHub API"); - Assertions.assertThat(gitHubConfig.get(0).getDataType()).isEqualTo(DataTypeEnum.PASSWORD); + assertThat(gitHubConfig.get(0).getDataType()).isEqualTo(DataTypeEnum.PASSWORD); } @Test void shouldGetWidgetNull() throws IOException { - Assertions.assertThat(WidgetUtils.getWidget(null)).isNull(); + assertThat(WidgetUtils.getWidget(null)).isNull(); } @Test void shouldGetWidgetNoDelay() throws IOException { - Assertions.assertThat(WidgetUtils.getWidget( + assertThat(WidgetUtils.getWidget( new File("src/test/resources/specific-repository/content/specific-widgets/widgets/no-delay"))) .isNull(); } @Test void shouldGetWidgetDelayButNoScript() throws IOException { - Assertions.assertThat(WidgetUtils.getWidget( + assertThat(WidgetUtils.getWidget( new File("src/test/resources/specific-repository/content/" + "specific-widgets/widgets/delay-but-no-script"))) .isNull(); @@ -196,7 +195,7 @@ void shouldGetWidgetDelayButNoScript() throws IOException { @Test void shouldGetWidgetNoTechnicalName() throws IOException { - Assertions.assertThat(WidgetUtils.getWidget( + assertThat(WidgetUtils.getWidget( new File("src/test/resources/specific-repository/content/specific-widgets/widgets/no-technical-name"))) .isNull(); }