Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 4b478c4

Browse files
refactor: rename incorrectly named test methods
1 parent b891660 commit 4b478c4

11 files changed

+18
-18
lines changed

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLFieldAssertAsBigDecimalTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void shouldFailIfPathNotFound(final @Mock PathNotFoundException pathNotFoundExce
6060

6161
@Test
6262
@DisplayName("Should fail if the value at the provided path cannot be converted.")
63-
void shouldFailIfIsNotNull(final @Mock IllegalArgumentException illegalArgumentException) {
63+
void shouldFailIfCannotBeConverted(final @Mock IllegalArgumentException illegalArgumentException) {
6464
// GIVEN
6565
given(graphQLResponse.get(MOCK_PATH, BigDecimal.class)).willThrow(illegalArgumentException);
6666
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLFieldAssertAsBigIntegerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void shouldFailIfPathNotFound(final @Mock PathNotFoundException pathNotFoundExce
6060

6161
@Test
6262
@DisplayName("Should fail if the value at the provided path cannot be converted.")
63-
void shouldFailIfIsNotNull(final @Mock IllegalArgumentException illegalArgumentException) {
63+
void shouldFailIfCannotBeConverted(final @Mock IllegalArgumentException illegalArgumentException) {
6464
// GIVEN
6565
given(graphQLResponse.get(MOCK_PATH, BigInteger.class)).willThrow(illegalArgumentException);
6666
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLFieldAssertAsBooleanTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void shouldFailIfPathNotFound(final @Mock PathNotFoundException pathNotFoundExce
5757

5858
@Test
5959
@DisplayName("Should fail if the value at the provided path cannot be converted.")
60-
void shouldFailIfIsNotNull(final @Mock IllegalArgumentException illegalArgumentException) {
60+
void shouldFailIfCannotBeConverted(final @Mock IllegalArgumentException illegalArgumentException) {
6161
// GIVEN
6262
given(graphQLResponse.get(MOCK_PATH, Boolean.class)).willThrow(illegalArgumentException);
6363
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLFieldAssertAsByteTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void shouldFailIfPathNotFound(final @Mock PathNotFoundException pathNotFoundExce
5858

5959
@Test
6060
@DisplayName("Should fail if the value at the provided path cannot be converted.")
61-
void shouldFailIfIsNotNull(final @Mock IllegalArgumentException illegalArgumentException) {
61+
void shouldFailIfCannotBeConverted(final @Mock IllegalArgumentException illegalArgumentException) {
6262
// GIVEN
6363
given(graphQLResponse.get(MOCK_PATH, Byte.class)).willThrow(illegalArgumentException);
6464
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLFieldAssertAsIntegerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void shouldFailIfPathNotFound(final @Mock PathNotFoundException pathNotFoundExce
5858

5959
@Test
6060
@DisplayName("Should fail if the value at the provided path cannot be converted.")
61-
void shouldFailIfIsNotNull(final @Mock IllegalArgumentException illegalArgumentException) {
61+
void shouldFailIfCannotBeConverted(final @Mock IllegalArgumentException illegalArgumentException) {
6262
// GIVEN
6363
given(graphQLResponse.get(MOCK_PATH, Integer.class)).willThrow(illegalArgumentException);
6464
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLFieldAssertAsJavaListTypeTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public class GraphQLFieldAssertAsJavaListTypeTest extends GraphQLFieldAssertTest
2222
.constructCollectionLikeType(List.class, String.class);
2323

2424
@Test
25-
@DisplayName("Should return a String assertion (value at specific path is valid list).")
26-
void shouldReturnStringAssertIfFieldIsNonNull() {
25+
@DisplayName("Should return a String list assertion (value at specific path is valid list).")
26+
void shouldReturnStringListAssertIfFieldIsNonNull() {
2727
// GIVEN
2828
final List<String> values = Arrays.asList("value1", "value2");
2929
given(graphQLResponse.get(MOCK_PATH, STRING_LIST_TYPE)).willReturn(values);
@@ -38,8 +38,8 @@ void shouldReturnStringAssertIfFieldIsNonNull() {
3838
}
3939

4040
@Test
41-
@DisplayName("Should return a String assertion (value at specific path is null).")
42-
void shouldReturnStringAssertIfFieldIsNull() {
41+
@DisplayName("Should return a String list assertion (value at specific path is null).")
42+
void shouldReturnStringListAssertIfFieldIsNull() {
4343
// GIVEN
4444
given(graphQLResponse.get(MOCK_PATH, STRING_LIST_TYPE)).willReturn(null);
4545
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLFieldAssertAsListTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
public class GraphQLFieldAssertAsListTest extends GraphQLFieldAssertTestBase {
1919

2020
@Test
21-
@DisplayName("Should return a String assertion (value at specific path is valid list).")
22-
void shouldReturnStringAssertIfFieldIsNonNull() {
21+
@DisplayName("Should return a String list assertion (value at specific path is valid list).")
22+
void shouldReturnStringListAssertIfFieldIsNonNull() {
2323
// GIVEN
2424
final List<String> values = Arrays.asList("value1", "value2");
2525
given(graphQLResponse.getList(MOCK_PATH, String.class)).willReturn(values);
@@ -34,8 +34,8 @@ void shouldReturnStringAssertIfFieldIsNonNull() {
3434
}
3535

3636
@Test
37-
@DisplayName("Should return a String assertion (value at specific path is null).")
38-
void shouldReturnStringAssertIfFieldIsNull() {
37+
@DisplayName("Should return a String list assertion (value at specific path is null).")
38+
void shouldReturnStringListAssertIfFieldIsNull() {
3939
// GIVEN
4040
given(graphQLResponse.getList(MOCK_PATH, String.class)).willReturn(null);
4141
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);
@@ -62,7 +62,7 @@ void shouldFailIfPathNotFound(final @Mock PathNotFoundException pathNotFoundExce
6262

6363
@Test
6464
@DisplayName("Should fail if the value at the provided path cannot be converted.")
65-
void shouldFailIfIsNotNull(final @Mock IllegalArgumentException illegalArgumentException) {
65+
void shouldFailIfCannotBeConverted(final @Mock IllegalArgumentException illegalArgumentException) {
6666
// GIVEN
6767
given(graphQLResponse.getList(MOCK_PATH, String.class)).willThrow(illegalArgumentException);
6868
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLFieldAssertAsLongTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void shouldFailIfPathNotFound(final @Mock PathNotFoundException pathNotFoundExce
5858

5959
@Test
6060
@DisplayName("Should fail if the value at the provided path cannot be converted.")
61-
void shouldFailIfIsNotNull(final @Mock IllegalArgumentException illegalArgumentException) {
61+
void shouldFailIfCannotBeConverted(final @Mock IllegalArgumentException illegalArgumentException) {
6262
// GIVEN
6363
given(graphQLResponse.get(MOCK_PATH, Long.class)).willThrow(illegalArgumentException);
6464
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLFieldAssertAsShortTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void shouldFailIfPathNotFound(final @Mock PathNotFoundException pathNotFoundExce
5858

5959
@Test
6060
@DisplayName("Should fail if the value at the provided path cannot be converted.")
61-
void shouldFailIfIsNotNull(final @Mock IllegalArgumentException illegalArgumentException) {
61+
void shouldFailIfCannotBeConverted(final @Mock IllegalArgumentException illegalArgumentException) {
6262
// GIVEN
6363
given(graphQLResponse.get(MOCK_PATH, Short.class)).willThrow(illegalArgumentException);
6464
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);

graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLFieldAssertAsStringTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void shouldFailIfPathNotFound(final @Mock PathNotFoundException pathNotFoundExce
5858

5959
@Test
6060
@DisplayName("Should fail if the value at the provided path cannot be converted.")
61-
void shouldFailIfIsNotNull(final @Mock IllegalArgumentException illegalArgumentException) {
61+
void shouldFailIfCannotBeConverted(final @Mock IllegalArgumentException illegalArgumentException) {
6262
// GIVEN
6363
given(graphQLResponse.get(MOCK_PATH, String.class)).willThrow(illegalArgumentException);
6464
final GraphQLFieldAssert graphQLFieldAssert = new GraphQLFieldAssert(graphQLResponse, MOCK_PATH);

0 commit comments

Comments
 (0)