Skip to content

Commit

Permalink
test: implementing user/link domain test code
Browse files Browse the repository at this point in the history
  • Loading branch information
taegyun1995 committed Aug 16, 2023
1 parent f77d0bd commit ffce208
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static project.linkarchive.backend.link.enums.LinkStatus.ACTIVE;
import static project.linkarchive.backend.pin.enums.PinStatus.UNFIXED;
import static project.linkarchive.backend.util.constant.Constants.*;

class LinkTest extends SetUpMockData {
Expand All @@ -35,7 +36,7 @@ void testLink() {
@DisplayName("Link Constructor - Domain")
@Test
void testConstructor() {
link = new Link(LINK_ID, URL, TITLE, DESCRIPTION, THUMBNAIL, BOOKMARK_COUNT, ACTIVE, user);
link = new Link(LINK_ID, URL, TITLE, DESCRIPTION, THUMBNAIL, BOOKMARK_COUNT, ACTIVE, UNFIXED, user);

assertEquals(LINK_ID, link.getId());
assertEquals(URL, link.getUrl());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static project.linkarchive.backend.auth.AuthProvider.TEST;
import static project.linkarchive.backend.notification.enums.NotificationPreference.ALLOWED;
import static project.linkarchive.backend.util.constant.Constants.*;

class UserTest extends SetUpMockData {
Expand All @@ -33,7 +34,7 @@ void testGetter() {
@DisplayName("User Constructor - Domain")
@Test
void testConstructor() {
user = new User(USER_ID, TEST, SOCIAL_ID, EMAIL, NICKNAME, INTRODUCE, FOLLOWER_COUNT, FOLLOWING_COUNT, USER_LINK_COUNT, USER_BOOKMARK_COUNT, profileImage);
user = new User(USER_ID, SOCIAL_ID, TEST, EMAIL, NICKNAME, INTRODUCE, FOLLOWER_COUNT, FOLLOWING_COUNT, USER_LINK_COUNT, USER_BOOKMARK_COUNT, ALLOWED, profileImage);

assertEquals(USER_ID, user.getId());
assertEquals(SOCIAL_ID, user.getSocialId());
Expand Down

0 comments on commit ffce208

Please sign in to comment.