From ad11accf04108acb3421a6c4bb7c3bb8e2d262b0 Mon Sep 17 00:00:00 2001 From: KronosDP <darrel.danadyaksa19@gmail.com> Date: Wed, 26 Feb 2025 15:16:01 +0700 Subject: [PATCH] [REFACTOR] Change access modifiers in UserTest for improved encapsulation --- .../com/safetypin/authentication/model/UserTest.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/safetypin/authentication/model/UserTest.java b/src/test/java/com/safetypin/authentication/model/UserTest.java index 2001bd2..f66bde4 100644 --- a/src/test/java/com/safetypin/authentication/model/UserTest.java +++ b/src/test/java/com/safetypin/authentication/model/UserTest.java @@ -1,13 +1,15 @@ package com.safetypin.authentication.model; import org.junit.jupiter.api.Test; + import java.time.LocalDate; + import static org.junit.jupiter.api.Assertions.*; -public class UserTest { +class UserTest { @Test - public void testDefaultConstructorDefaults() { + void testDefaultConstructorDefaults() { User user = new User(); // Verify that default constructor sets all fields to their default values assertNull(user.getId(), "Default id should be null"); @@ -22,7 +24,7 @@ public class UserTest { } @Test - public void testSettersAndGetters() { + void testSettersAndGetters() { User user = new User(); Long id = 123L; String email = "test@example.com"; @@ -56,7 +58,7 @@ public class UserTest { } @Test - public void testParameterizedConstructor() { + void testParameterizedConstructor() { String email = "test2@example.com"; String password = "password123"; String name = "Another User"; -- GitLab