From 6c806e1ce97b274affd8401bf2a22c5ce45d102e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20Br=C3=B6ker?= Date: Wed, 27 May 2020 16:59:25 +0200 Subject: [PATCH] Revert to junit 4 --- server/implementation/pom.xml | 11 ++------ .../transformation/CharTransformerTest.java | 28 ++++++++++--------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/server/implementation/pom.xml b/server/implementation/pom.xml index aadc2993e..d4afe9926 100644 --- a/server/implementation/pom.xml +++ b/server/implementation/pom.xml @@ -71,15 +71,8 @@ - org.junit.jupiter - junit-jupiter - 5.6.2 - test - - - org.junit.vintage - junit-vintage-engine - 5.6.2 + junit + junit test diff --git a/server/implementation/src/test/java/io/smallrye/graphql/transformation/CharTransformerTest.java b/server/implementation/src/test/java/io/smallrye/graphql/transformation/CharTransformerTest.java index 3bfe9fae6..984a45355 100644 --- a/server/implementation/src/test/java/io/smallrye/graphql/transformation/CharTransformerTest.java +++ b/server/implementation/src/test/java/io/smallrye/graphql/transformation/CharTransformerTest.java @@ -3,34 +3,36 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.CsvSource; +import org.junit.Test; public class CharTransformerTest { - @ParameterizedTest - @CsvSource({ - "ab,a", - "a,a" - }) - void shouldUseFirstCharFromString(String graphQlString, Character expected) { - final Character actual = new CharTransformer().in(graphQlString); + @Test + public void shouldUseFirstCharFromString() { + final Character actual = new CharTransformer().in("ab"); + + assertThat(actual).isEqualTo('a'); + } - assertThat(actual).isEqualTo(expected); + @Test + public void shouldUseFirstCharFromSingleLetterString() { + final Character actual = new CharTransformer().in("a"); + + assertThat(actual).isEqualTo('a'); } @Test - void shouldThrowIfStringIsEmpty() { + public void shouldThrowIfStringIsEmpty() { assertThatThrownBy(() -> new CharTransformer().in("")) .isInstanceOf(Exception.class); } @Test - void shouldFormatCharAsString() { + public void shouldFormatCharAsString() { final String actual = new CharTransformer().out('a'); assertThat(actual).isEqualTo("a"); } + }