Skip to content

Commit

Permalink
test(Feedback): 피드백 도메인 테스트 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
zbqmgldjfh committed Jan 9, 2024
1 parent 844fc69 commit 0ddb19d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;

@DisplayName("도메인 : Admin")
class AdminTest {

@DisplayName("Admin 생성 테스트")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,33 @@

import java.util.stream.Stream;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.Assertions.*;

public class UserFeedbackTest {
@DisplayName("도메인 : Feedback")
public class FeedbackTest {

@DisplayName("피드백을 생성할 수 있다")
@Test
public void create_feedback() {
// given
User user = new User("token");

// when, then
assertThatCode(() -> new Feedback("contents!", user))
.doesNotThrowAnyException();
}

@DisplayName("피드백 동등성 확인")
@Test
public void feedback_equals() {
// given
User user = new User("token");
Feedback feedback1 = new Feedback("contents1", user);
Feedback feedback2 = new Feedback("contents2", user);

// when, then
assertThat(feedback1).isEqualTo(feedback2);
}

@DisplayName("피드백을 추가할 수 있다")
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;

@DisplayName("도메인 : User")
class UserTest {

@DisplayName("User 생성 테스트")
Expand Down

0 comments on commit 0ddb19d

Please sign in to comment.