본문 바로가기 메뉴 바로가기

seobi

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

seobi

검색하기 폼
  • 분류 전체보기 (65)
    • web (1)
    • iOS (47)
      • CI/CD (8)
      • Rx (2)
      • Test (9)
      • Project Related (2)
    • IOT (10)
    • 코딩테스트 (3)
    • AI (2)
  • 방명록

customEndpointClosure (1)
테스트 응용 -Moya API Test-3

이제 마지막으로 테스트 코드를 작성해 본다. moya 에서 제공하는 customEndpointClosure를 쓰면 별다른 조건 없이 샘플 데이터가 들어오는 것 처럼 동작 시킬 수 있다. func testExample() throws { let disposeBag = DisposeBag() //async 테스트를 위해 expectation 작성 let expectation = XCTestExpectation() //moya에서 제공해주는 라이브러리로 실제 서버가 아닌 커스텀 엔드포인트를 만드는 과정이다. let customEndpointClosure = { (target: JokeAPI) -> Endpoint in return Endpoint(url: URL(target: target).absoluteSt..

iOS/Test 2022. 8. 24. 00:54
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • Moya
  • 프로그래머스
  • 모듏화
  • 같이쓰기
  • CI/CD
  • bitrise
  • swiftLint
  • firebase
  • 빌드자동화
  • ChatGPT
  • jenkins
  • MQTT
  • geohash
  • 무료는 아니지만
  • chatgpt 4o
  • IF (KAKAO) DEV 2022
  • GCD
  • async
  • xcode whitespace trim option
  • AWS IoT
  • 코테
  • AppThinning
  • ATS failed system trust
  • ios
  • Fastlane
  • Default Rules
  • XCTestExpectation
  • swift
  • RxSwift
  • GPT4
more
«   2025/10   »
일 월 화 수 목 금 토
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바