Skip to content

Commit

Permalink
수정사항 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
ddaaac committed Aug 3, 2020
1 parent b13ff8f commit ce84959
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@ class IssueRepositoryTest {
private IssueRepository issueRepository;

@Test
void name() {
void auditFinalField() {
final Issue issue = issueRepository.save(
Issue.builder().title("이슈").memberId(AggregateReference.to(1L)).build());

assertThat(issue.getCreatedAt()).isNotNull();
assertThat(issue.getUpdatedAt()).isNotNull();
}

@Test
void witherAccessibility() {
final Issue issue = issueRepository.save(
Issue.builder().title("이슈").memberId(AggregateReference.to(1L)).build());

final Issue persisted = issueRepository.findById(issue.getId()).get();

assertThat(persisted.getCreatedAt()).isEqualTo(issue.getCreatedAt());
assertThat(persisted.getUpdatedAt()).isEqualTo(issue.getUpdatedAt());
}
}

0 comments on commit ce84959

Please sign in to comment.