Skip to content

Commit

Permalink
Merge pull request #77 from U2DJ2/be/refactor/university-crawling
Browse files Browse the repository at this point in the history
[BE] 테스트 코드 오류 수정
  • Loading branch information
Anak-2 authored May 1, 2024
2 parents 42759a4 + 2909b76 commit c3dc318
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package moim_today.implement.university;

import moim_today.domain.university.ExtractUniversity;
import moim_today.persistence.entity.university.UniversityJpaEntity;
import moim_today.util.ImplementTest;
import org.junit.jupiter.api.DisplayName;
Expand Down Expand Up @@ -28,13 +29,13 @@ class UniversityUpdaterTest extends ImplementTest {

universityRepository.save(universityJpaEntity);

UniversityJpaEntity updateUniversity = UniversityJpaEntity.builder()
.universityName(AJOU_UNIV_NAME)
.universityEmail(AJOU_EMAIL)
ExtractUniversity extractUniversity = ExtractUniversity.builder()
.schoolName(AJOU_UNIV_NAME)
.link(AJOU_EMAIL)
.build();

// when
universityUpdater.putUniversity(updateUniversity);
universityUpdater.putUniversity(extractUniversity);
UniversityJpaEntity findUniversity = universityRepository.findByName(AJOU_UNIV_NAME).get();

// then
Expand All @@ -45,13 +46,13 @@ class UniversityUpdaterTest extends ImplementTest {
@Test
void 중복되는_대학이름이_없을_때_putUniversity(){
// given
UniversityJpaEntity universityJpaEntity = UniversityJpaEntity.builder()
.universityName(AJOU_UNIV_NAME)
.universityEmail(AJOU_EMAIL)
ExtractUniversity extractUniversity = ExtractUniversity.builder()
.schoolName(AJOU_UNIV_NAME)
.link(AJOU_EMAIL)
.build();

// when
universityUpdater.putUniversity(universityJpaEntity);
universityUpdater.putUniversity(extractUniversity);
UniversityJpaEntity findUniversity = universityRepository.findByName(AJOU_UNIV_NAME).get();

// then
Expand Down

0 comments on commit c3dc318

Please sign in to comment.