Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

코어데이터 저장 로직 테스트 추가 #24

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

eunjooChoi
Copy link
Owner

@eunjooChoi eunjooChoi commented Mar 2, 2024

87c5dec

  • CoreDataStack 테스트를 위해 inMemory로 지정할 수 있도록 초기화 구조 변경
  • MoodRecord 폴더 추가

a716719

  • MoodRecordViewModel 파일 생성

    • ViewModel에서 context를 가질 수 있도록 DayCellView에서 MoodRecordView로 넘어올 때 View 모델에 context를 주입
    • 코어데이터에 저장 시 Date 초기화를 위해 calendarModel도 함께 받도록 추가
  • xcdatamodel 수정

    • mood를 String 타입으로 변경
    • CoreDataProperties와 CoreDataClass 추가
      • Date와 mood를 non-optional로 관리하기 위해 manual로 생성

TestCode만 먼저 추가했기 때문에 테스트 실패. 추후 로직 추가 예정

726e3ba

  • MoodREcordViewModel fetch, save 로직 추가
    • 저장 Date를 'yyyy-mm-dd' 문자열로 관리하는 것이 좋을지 확인 필요

@eunjooChoi eunjooChoi self-assigned this Mar 2, 2024
@eunjooChoi eunjooChoi linked an issue Mar 2, 2024 that may be closed by this pull request
2 tasks
@eunjooChoi eunjooChoi force-pushed the logic/core-data-test branch from 7327bc7 to 48c3a34 Compare March 2, 2024 12:52
@eunjooChoi eunjooChoi force-pushed the logic/core-data-test branch from 48c3a34 to 87c5dec Compare March 2, 2024 12:58
@eunjooChoi eunjooChoi marked this pull request as draft March 2, 2024 13:06
@eunjooChoi eunjooChoi force-pushed the logic/core-data-test branch from 042f613 to 312d621 Compare March 3, 2024 13:35
## 수정 사항
- MoodRecordViewModel 파일 생성
   - ViewModel에서 context를 가질 수 있도록 DayCellView에서 MoodRecordView로 넘어올 때 View 모델에 context를 주입
   - 코어데이터에 저장 시 Date 초기화를 위해 calendarModel도 함께 받도록 추가

- xcdatamodel 수정
   - mood를 String 타입으로 변경
   - CoreDataProperties와 CoreDataClass 추가
       - Date와 mood를 non-optional로 관리하기 위해 manual로 생성
@eunjooChoi eunjooChoi force-pushed the logic/core-data-test branch from 312d621 to a716719 Compare March 4, 2024 04:03
- 저장 Date를 'yyyy-mm-dd' 문자열로 관리하는 것이 좋을지 확인 필요
@eunjooChoi eunjooChoi marked this pull request as ready for review March 4, 2024 05:37
@eunjooChoi
Copy link
Owner Author

github action worksflow에 result를 체크할 수 있는 코드 추가 후 빌드 실패하는 테스트 코드 수정 예정

@eunjooChoi eunjooChoi merged commit fc49537 into develop Mar 4, 2024
1 check passed
@eunjooChoi eunjooChoi deleted the logic/core-data-test branch March 11, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

저장 방식 구현
1 participant