From 929d712ad6e81741af55930e81418af0dbb36287 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Sun, 19 Nov 2023 06:36:28 +0000 Subject: [PATCH] feat: update lambda expression Signed-off-by: Otavio Santana --- .../communication/column/ColumnDeleteQueryTest.java | 8 ++------ .../eclipse/jnosql/communication/column/ColumnTest.java | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/jnosql-communication/jnosql-communication-column/src/test/java/org/eclipse/jnosql/communication/column/ColumnDeleteQueryTest.java b/jnosql-communication/jnosql-communication-column/src/test/java/org/eclipse/jnosql/communication/column/ColumnDeleteQueryTest.java index 22945ba7b..c9f67aed3 100644 --- a/jnosql-communication/jnosql-communication-column/src/test/java/org/eclipse/jnosql/communication/column/ColumnDeleteQueryTest.java +++ b/jnosql-communication/jnosql-communication-column/src/test/java/org/eclipse/jnosql/communication/column/ColumnDeleteQueryTest.java @@ -32,9 +32,7 @@ class ColumnDeleteQueryTest { @Test void shouldBuilderThrownException() { - assertThrows(NullPointerException.class, () -> { - ColumnDeleteQuery.builder(new String[]{null}); - }); + assertThrows(NullPointerException.class, () -> ColumnDeleteQuery.builder(new String[]{null})); } @ParameterizedTest(name = "{0} passed to build method then a valid builder should be returned") @@ -46,9 +44,7 @@ void shouldBuildReturnsAValidBuilder(String scenario, String[] documents) { @Test void shouldDeleteThrownException() { - assertThrows(NullPointerException.class, () -> { - ColumnDeleteQuery.delete(new String[]{null}); - }); + assertThrows(NullPointerException.class, () -> ColumnDeleteQuery.delete(new String[]{null})); } @ParameterizedTest(name = "{0} passed to delete method then a valid builder should be returned") diff --git a/jnosql-communication/jnosql-communication-column/src/test/java/org/eclipse/jnosql/communication/column/ColumnTest.java b/jnosql-communication/jnosql-communication-column/src/test/java/org/eclipse/jnosql/communication/column/ColumnTest.java index 2c1029e09..e377ea61f 100644 --- a/jnosql-communication/jnosql-communication-column/src/test/java/org/eclipse/jnosql/communication/column/ColumnTest.java +++ b/jnosql-communication/jnosql-communication-column/src/test/java/org/eclipse/jnosql/communication/column/ColumnTest.java @@ -34,9 +34,7 @@ class ColumnTest { @Test void shouldReturnNameWhenNameIsNull() { - Assertions.assertThrows(NullPointerException.class, () -> { - Column.of(null, DEFAULT_VALUE); - }); + Assertions.assertThrows(NullPointerException.class, () -> Column.of(null, DEFAULT_VALUE)); } @Test