From 7836ee4c178f636ba3cf7b5028769ffb55d635fb Mon Sep 17 00:00:00 2001 From: "ICKostiantyn.Ivanov" Date: Tue, 20 Feb 2024 07:48:34 +0100 Subject: [PATCH] BAEL-6581 -Drop the "public" keyword on the test methods --- .../SkipSelectBeforeInsertIntegrationTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-boot-modules/spring-boot-data-3/src/test/java/com/baeldung/skipselectbeforeinsert/SkipSelectBeforeInsertIntegrationTest.java b/spring-boot-modules/spring-boot-data-3/src/test/java/com/baeldung/skipselectbeforeinsert/SkipSelectBeforeInsertIntegrationTest.java index a801c8728b..5d8a343333 100644 --- a/spring-boot-modules/spring-boot-data-3/src/test/java/com/baeldung/skipselectbeforeinsert/SkipSelectBeforeInsertIntegrationTest.java +++ b/spring-boot-modules/spring-boot-data-3/src/test/java/com/baeldung/skipselectbeforeinsert/SkipSelectBeforeInsertIntegrationTest.java @@ -31,21 +31,21 @@ public class SkipSelectBeforeInsertIntegrationTest { private TaskJpaRepository taskJpaRepository; @Test - public void givenRepository_whenSaveNewTaskWithPopulatedId_thenExtraSelectIsExpected() { + void givenRepository_whenSaveNewTaskWithPopulatedId_thenExtraSelectIsExpected() { Task task = new Task(); task.setId(1); taskRepository.saveAndFlush(task); } @Test - public void givenRepository_whenSaveNewTaskWithGeneratedId_thenNoExtraSelectIsExpected() { + void givenRepository_whenSaveNewTaskWithGeneratedId_thenNoExtraSelectIsExpected() { TaskWithGeneratedId task = new TaskWithGeneratedId(); TaskWithGeneratedId saved = taskWithGeneratedIdRepository.saveAndFlush(task); assertNotNull(saved.getId()); } @Test - public void givenRepository_whenSaveNewPersistableTask_thenNoExtraSelectIsExpected() { + void givenRepository_whenSaveNewPersistableTask_thenNoExtraSelectIsExpected() { PersistableTask persistableTask = new PersistableTask(); persistableTask.setId(2); persistableTask.setNew(true); @@ -54,7 +54,7 @@ public class SkipSelectBeforeInsertIntegrationTest { } @Test - public void givenRepository_whenSaveNewPersistableTasksWithSameId_thenExceptionIsExpected() { + void givenRepository_whenSaveNewPersistableTasksWithSameId_thenExceptionIsExpected() { PersistableTask persistableTask = new PersistableTask(); persistableTask.setId(3); persistableTask.setNew(true); @@ -69,7 +69,7 @@ public class SkipSelectBeforeInsertIntegrationTest { } @Test - public void givenRepository_whenPersistNewTaskUsingCustomPersistMethod_thenNoExtraSelectIsExpected() { + void givenRepository_whenPersistNewTaskUsingCustomPersistMethod_thenNoExtraSelectIsExpected() { Task task = new Task(); task.setId(4); Task saved = taskRepository.persistAndFlush(task); @@ -78,7 +78,7 @@ public class SkipSelectBeforeInsertIntegrationTest { } @Test - public void givenRepository_whenPersistNewTaskUsingPersist_thenNoExtraSelectIsExpected() { + void givenRepository_whenPersistNewTaskUsingPersist_thenNoExtraSelectIsExpected() { Task task = new Task(); task.setId(5); Task saved = taskJpaRepository.persistAndFlush(task); @@ -87,7 +87,7 @@ public class SkipSelectBeforeInsertIntegrationTest { } @Test - public void givenRepository_whenPersistTaskWithTheSameId_thenExceptionIsExpected() { + void givenRepository_whenPersistTaskWithTheSameId_thenExceptionIsExpected() { Task task = new Task(); task.setId(5); taskJpaRepository.persistAndFlush(task); @@ -100,7 +100,7 @@ public class SkipSelectBeforeInsertIntegrationTest { } @Test - public void givenRepository_whenPersistNewTaskUsingNativeQuery_thenNoExtraSelectIsExpected() { + void givenRepository_whenPersistNewTaskUsingNativeQuery_thenNoExtraSelectIsExpected() { Task task = new Task(); task.setId(6); taskRepository.insert(task);