Fakultas Ilmu Komputer UI
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
be-authentication-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SafetyPin
be-authentication-test
Commits
ad11accf
Commit
ad11accf
authored
2 months ago
by
Darrel Danadyaksa Poli
Browse files
Options
Downloads
Patches
Plain Diff
[REFACTOR] Change access modifiers in UserTest for improved encapsulation
parent
bb1325fd
Branches
Branches containing commit
No related tags found
1 merge request
!1
Login registration
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/com/safetypin/authentication/model/UserTest.java
+6
-4
6 additions, 4 deletions
...est/java/com/safetypin/authentication/model/UserTest.java
with
6 additions
and
4 deletions
src/test/java/com/safetypin/authentication/model/UserTest.java
+
6
−
4
View file @
ad11accf
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"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment