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

[테스트] PersistenceStorage 작성 완료 #336

Merged
merged 3 commits into from
Dec 2, 2021

Conversation

Modyhoon
Copy link
Collaborator

@Modyhoon Modyhoon commented Dec 1, 2021

작업 내용

  • create(), get(), getFromUserDefaults(), delete() 테스트 완료

시연 방법

기타 (고민과 해결, 리뷰 포인트 등)

getFromUserDefaults나 delete의 경우 시행하기 전에 미리 만들어져있는 데이터가 필요하다.
하지만 생성하는 시점과 조회하는 시점이 차이가 있을경우 테스트가 제대로 작동하지 않는다.
따라서 expectation을 통해 시점을 조정하도록 코드를 짰음

[ + ] 추가로 guard let result = resultOpt else { return } 이런식으로 작성되어있는 옵셔널 언래핑이 있는데,
github action이 같은 이름으로 언래핑하는 것을 막는 바람에 다음과 같은 구문이 불가능했다.
guard let result = result else { return }

modyhoon added 2 commits December 1, 2021 13:47
동시접근 이슈가 너무 자주 발생해서 expectation을 통해 순서를 보장
@Modyhoon Modyhoon added the 👍 review 리뷰 요청시 사용하는 라벨 label Dec 1, 2021
@Modyhoon Modyhoon self-assigned this Dec 1, 2021
@Modyhoon Modyhoon added the 🛡 test 테스트 코드 작성 label Dec 1, 2021
@Modyhoon Modyhoon force-pushed the test/PersistentStorage branch from 383b321 to 7ebd0f7 Compare December 1, 2021 06:14
@Modyhoon Modyhoon merged commit 9587790 into develop Dec 2, 2021
@sujeong000 sujeong000 deleted the test/PersistentStorage branch December 2, 2021 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👍 review 리뷰 요청시 사용하는 라벨 🛡 test 테스트 코드 작성
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant