Slide 1

Slide 1 text

Copyright (C) DeNA Co.,Ltd. All Rights Reserved. iOS Test Night #8 2018/07/24 (Tue) 
 ࡉপ ༞հ@DeNA )5514UVCϥΠϒϥϦ ʮ.PDLJOHKBZʯΛ࢖ͬͯΈͨ࿩ 1

Slide 2

Slide 2 text

˙:VTVLF)PTPOVNBʢ!UPCJʣ • ॴଐ ⁃ %F/"ɹ48&5άϧʔϓɹςετج൫νʔϜ • 'BWPSJUF ⁃ • ۙگ ⁃ ,VCFSOFUFT(,&ָ͕͍͠ʂ ⁃ J04%$ͰϨΪϡϥʔτʔΫʢ෼ʣʹ࠾୒ ࣗݾ঺հ Copyright (C) DeNA Co.,Ltd. All Rights Reserved. 2

Slide 3

Slide 3 text

ࠓ೔ɺ࿩͢͜ͱ 3 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 4

Slide 4 text

)5514UVCϥΠϒϥϦ ʮ.PDLJOHKBZʯ ͷ঺հɾ޻෉ͨ͠ͱ͜Ζ 4 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 5

Slide 5 text

ΞδΣϯμ 5 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. • )5514UVCͱ͸ʁ • ࠓճͷར༻έʔε • .PDLJOHKBZͱ͸ʁ • ޻෉ͨ͠ͱ͜Ζ • ·ͱΊ

Slide 6

Slide 6 text

)5514UVCͱ͸ʁ 6 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 7

Slide 7 text

HTTP Stub ͱ͸ʁ 7 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. • )551ϦΫΤετ௨৴ʹର͢Δ4UVCʢِ෺ʣ • ϦΫΤετʹରͯ͠ɺ೚ҙͷϨεϙϯεΛฦ͢ • ֎෦αʔόʹґଘ͠ͳ͍ςετ͕ॻ͚Δ

Slide 8

Slide 8 text

HTTP௨৴ 8 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ΞϓϦ αʔό (&5BQJBSUJDMF 0,

Slide 9

Slide 9 text

HTTP௨৴ 9 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ΞϓϦ αʔό (&5BQJBSUJDMF 0, ʲ՝୊ʳ Τϥʔ͕ฦ٫͞Εͨ৔߹ͷ ςετ͸Ͳ͏΍Δʁ

Slide 10

Slide 10 text

HTTP௨৴ϨϕϧͷςετΛͲ͏͢Δʁ 10 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. • ΍Βͳ͍ • ௨৴༻.PEFMΫϥεͷ4UVCͰΧόʔ • &&ςετͰΧόʔ • ΍Δ • αʔόଆͷઃఆΛҰ࣌తʹมߋ • )5514UVC

Slide 11

Slide 11 text

HTTP௨৴ϨϕϧͷςετΛͲ͏͢Δʁ 11 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. • ΍Βͳ͍ • ௨৴༻.PEFMΫϥεͷ4UVCͰΧόʔ • &&ςετͰΧόʔ • ΍Δ • αʔόଆͷઃఆΛҰ࣌తʹมߋ • )5514UVC ࠓճͷબ୒

Slide 12

Slide 12 text

HTTP Stub 12 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ΞϓϦ αʔό (&5BQJBSUJDMF /05@'06/% )5514UVC αʔόͱͷؒʹೖͬͯɺ ೚ҙͷϨεϙϯεΛฦ͢ʂ

Slide 13

Slide 13 text

ࠓճͷར༻έʔε 13 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 14

Slide 14 text

ࠓճͷར༻έʔε 14 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. Client αʔό 4XJGU1. αʔόͱԿ౓΋௨৴͢Δ ઃఆ஋ʹج͍ͮͯ$-*Λ࣮ߦͯ͠ɺ ҙਤͨ͠௨৴͕ߦΘΕΔ͔Λݕূ͍ͨ͠ʜ $-*πʔϧ

Slide 15

Slide 15 text

)5514UVC ࠓճͷར༻έʔε 15 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. Client αʔό 4XJGU1. )5514UVCϥΠϒϥϦΛ࢖ͬͯɺ ΠϯςάϨʔγϣϯʢ݁߹ʣςετ .PDLJOHKBZΛ࢖ͬͯΈͨ

Slide 16

Slide 16 text

.PDLJOHKBZͱ͸ʁ 16 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 17

Slide 17 text

Mockingjayͱ͸ʁ 17 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. • )5514UVCϥΠϒϥϦ • 4XJGU • ϦΫΤετఆٛʢ.BUDIFSʣ • Ϩεϙϯεੜ੒ʢ#VJMEFSʣ • 63-4FTTJPO • $POpHVSBUJPOΛࠩ͠ସ͑ • 63-4FTTJPOҎ֎ͷ௨৴ʹ͸ར༻Ͱ͖ͳ͍ IUUQTHJUIVCDPNLZMFG.PDLJOHKBZ .FUIPE4XJ[[MJOH

Slide 18

Slide 18 text

ModelΫϥε 18 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let url = "http://example.com/api" struct ProposalRepository { func all(_ handler: @escaping ([ProposalElement]) -> Void) { Alamofire.request(url).responseProposal { response in if let proposals = response.result.value { handler(proposals) } } } }

Slide 19

Slide 19 text

ModelΫϥε 19 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let url = "http://example.com/api" struct ProposalRepository { func all(_ handler: @escaping ([ProposalElement]) -> Void) { Alamofire.request(url).responseProposal { response in if let proposals = response.result.value { handler(proposals) } } } } BQJ

Slide 20

Slide 20 text

ModelΫϥε 20 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let url = "http://example.com/api" struct ProposalRepository { func all(_ handler: @escaping ([ProposalElement]) -> Void) { Alamofire.request(url).responseProposal { response in if let proposals = response.result.value { handler(proposals) } } } } "MBNPpSF

Slide 21

Slide 21 text

ModelΫϥε 21 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let url = "http://example.com/api" struct ProposalRepository { func all(_ handler: @escaping ([ProposalElement]) -> Void) { Alamofire.request(url).responseProposal { response in if let proposals = response.result.value { handler(proposals) } } } } $BMMCBDL

Slide 22

Slide 22 text

ModelΫϥε 22 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let url = "http://example.com/api" struct ProposalRepository { func all(_ handler: @escaping ([ProposalElement]) -> Void) { Alamofire.request(url).responseProposal { response in if let proposals = response.result.value { handler(proposals) } } } } $BMMCBDL ͪͳΈʹRVJDLUZQFJPͰίʔυੜ੒

Slide 23

Slide 23 text

GET /api ʹରͯ͠ɺJSONΛฦ͢ 23 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let data: [[String: String]] = [ [ "title": "λΠτϧ1", "user": "Ϣʔβ໊", ], [ "title": "λΠτϧ2", "user": "Ϣʔβ໊", ], ] stub(http(.get, uri: "/api"), json(data))

Slide 24

Slide 24 text

GET /api ʹରͯ͠ɺJSONΛฦ͢ 24 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let data: [[String: String]] = [ [ "title": "λΠτϧ1", "user": "Ϣʔβ໊", ], [ "title": "λΠτϧ2", "user": "Ϣʔβ໊", ], ] stub(http(.get, uri: "/api"), json(data)) Ϩεϙϯεσʔλ

Slide 25

Slide 25 text

GET /api ʹରͯ͠ɺJSONΛฦ͢ 25 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let data: [[String: String]] = [ [ "title": "λΠτϧ1", "user": "Ϣʔβ໊", ], [ "title": "λΠτϧ2", "user": "Ϣʔβ໊", ], ] stub(http(.get, uri: "/api"), json(data)) ॲཧ͢ΔύεΛఆٛ

Slide 26

Slide 26 text

GET /api ʹରͯ͠ɺJSONΛฦ͢ 26 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let data: [[String: String]] = [ [ "title": "λΠτϧ1", "user": "Ϣʔβ໊", ], [ "title": "λΠτϧ2", "user": "Ϣʔβ໊", ], ] stub(http(.get, uri: "/api"), json(data)) Ϩεϙϯεఆٛ

Slide 27

Slide 27 text

࣮ࡍͷςετίʔυ 27 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let data: [[String: String]] = [ [ "title": "λΠτϧ1", "user": "Ϣʔβ໊" ], [ "title": "λΠτϧ2", "user": "Ϣʔβ໊" ], ] stub(http(.get, uri: "/api"), json(data)) let exp = expectation(description: "") repository.all { proposals in XCTAssertEqual(2, proposals.count) XCTAssertEqual("λΠτϧ1", proposals.first?.title) XCTAssertEqual("Ϣʔβ໊", proposals.first?.user) exp.fulfill() } wait(for: [exp], timeout: 3)

Slide 28

Slide 28 text

࣮ࡍͷςετίʔυ 28 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let data: [[String: String]] = [ [ "title": "λΠτϧ1", "user": "Ϣʔβ໊" ], [ "title": "λΠτϧ2", "user": "Ϣʔβ໊" ], ] stub(http(.get, uri: "/api"), json(data)) let exp = expectation(description: "") repository.all { proposals in XCTAssertEqual(2, proposals.count) XCTAssertEqual("λΠτϧ1", proposals.first?.title) XCTAssertEqual("Ϣʔβ໊", proposals.first?.user) exp.fulfill() } wait(for: [exp], timeout: 3) )5514UVCઃఆ

Slide 29

Slide 29 text

࣮ࡍͷςετίʔυ 29 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let data: [[String: String]] = [ [ "title": "λΠτϧ1", "user": "Ϣʔβ໊" ], [ "title": "λΠτϧ2", "user": "Ϣʔβ໊" ], ] stub(http(.get, uri: "/api"), json(data)) let exp = expectation(description: "") repository.all { proposals in XCTAssertEqual(2, proposals.count) XCTAssertEqual("λΠτϧ1", proposals.first?.title) XCTAssertEqual("Ϣʔβ໊", proposals.first?.user) exp.fulfill() } wait(for: [exp], timeout: 3) .PEFMͷςετ

Slide 30

Slide 30 text

࣮ࡍͷςετίʔυ 30 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let data: [[String: String]] = [ [ "title": "λΠτϧ1", "user": "Ϣʔβ໊" ], [ "title": "λΠτϧ2", "user": "Ϣʔβ໊" ], ] stub(http(.get, uri: "/api"), json(data)) let exp = expectation(description: "") repository.all { proposals in XCTAssertEqual(2, proposals.count) XCTAssertEqual("λΠτϧ1", proposals.first?.title) XCTAssertEqual("Ϣʔβ໊", proposals.first?.user) exp.fulfill() } wait(for: [exp], timeout: 3) ඇಉظॲཧΛ଴ͭ

Slide 31

Slide 31 text

޻෉ͨ͠ͱ͜Ζ 31 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 32

Slide 32 text

ᶃγϯλοΫεϊΠζ 32 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 33

Slide 33 text

Mockingjay API 33 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. stub(http(.get, uri: "/api")) { request in let data: [[String: String]] = [ [ "title": "λΠτϧ1", "user": "Ϣʔβ໊" ], [ "title": "λΠτϧ2", "user": "Ϣʔβ໊" ], ] return jsonBody(data)(request) }

Slide 34

Slide 34 text

Mockingjay API 34 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. stub(http(.get, uri: "/api")) { request in let data: [[String: String]] = [ [ "title": "λΠτϧ1", "user": "Ϣʔβ໊" ], [ "title": "λΠτϧ2", "user": "Ϣʔβ໊" ], ] return jsonBody(data)(request) } ͕ଟͯ͘গ͠ಡΈͮΒ͍ʜ • ϊΠζײ͕͋Δ • .BUDIFS"1*͸ίʔυิ׬ͮ͠Β͍

Slide 35

Slide 35 text

ϥούʔAPI Λॻ͍ͯΈΔ 35 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. func stubHttp(_ method: HTTPMethod, _ path: String, _ builder: @escaping Builder) { stub(http(method, uri: path)) { request in builder(request) } } ຊ౰ʹϥοϓ͚ͨͩ͠

Slide 36

Slide 36 text

Before / After 36 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. // // Before: // stub(http(.get, uri: "/api") { } // // After // stubHttp(.get, "/api") { } • ࢹೝੑ͕Α͘ͳͬͨʂ • ֮͑Δ͜ͱ΋গͳ͘ɺิ׬΋͠΍͍͢ʂ

Slide 37

Slide 37 text

ᶄ4UVC͕ ݺͼग़͞Εͨ͜ͱΛอূ 37 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 38

Slide 38 text

ૺ۰ͨ͠ࣄ৅ 38 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. TUVCΛઃఆ ςετΛॻ͘ ੒ޭͯ͠ظ଴Ͳ͓Γಈ͍ͯΔͱࢥͬͨ ࣮ࡍʹ͸63-ͷύε͕ҟͳ͓ͬͯΓ
 ݺ͹Ε͍ͯͳ͔ͬͨPS[ ͜͏͍ͬͨϛεΛແ͍ͨ͘͠ɾɾɾ

Slide 39

Slide 39 text

Stub ݺͼग़͠Λอূ͢Δ 39 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let exp = expectation(description: “/api") stubHttp(.get, "/api") { request in exp.fulfill() let data: [[String: String]] = [] return jsonBody(data)(request) } wait(for: [exp], timeout: 3)

Slide 40

Slide 40 text

Stub ݺͼग़͠Λอূ͢Δ 40 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let exp = expectation(description: “/api") stubHttp(.get, "/api") { request in exp.fulfill() let data: [[String: String]] = [] return jsonBody(data)(request) } wait(for: [exp], timeout: 3) 9$5FTU&YQFDUBUJPOΛੜ੒

Slide 41

Slide 41 text

Stub ݺͼग़͠Λอূ͢Δ 41 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let exp = expectation(description: “/api") stubHttp(.get, "/api") { request in exp.fulfill() let data: [[String: String]] = [] return jsonBody(data)(request) } wait(for: [exp], timeout: 3) 4UVC͕ݺͼग़͞ΕͨΒGVMMpMM

Slide 42

Slide 42 text

Stub ݺͼग़͠Λอূ͢Δ 42 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let exp = expectation(description: “/api") stubHttp(.get, "/api") { request in exp.fulfill() let data: [[String: String]] = [] return jsonBody(data)(request) } wait(for: [exp], timeout: 3) GVMMpMM͞Εͯͳ͚Ε͹ λΠϜΞ΢τͰࣦഊ

Slide 43

Slide 43 text

Stub ݺͼग़͠Λอূ͢Δ 43 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. let exp = expectation(description: “/api") stubHttp(.get, "/api") { request in exp.fulfill() let data: [[String: String]] = [] return jsonBody(data)(request) } wait(for: [exp], timeout: 3) • TUVC͕ݺͼग़͞Εͳ͍৔߹͸Τϥʔʹʂ • Ͱ΋ɺ৑௕ͳίʔυ͕ଟ͍ʁˠ͜Ε͸࣍Ͱʂ

Slide 44

Slide 44 text

ᶅ%4-ͷ੔උ 44 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 45

Slide 45 text

ݱঢ়ͷ՝୊ 45 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. • TUVC͕ݺͼग़͞ΕΔ͜ͱΛอূͰ͖ͨ • ຖճ͜ΕΛॻ͘ͷ͸໘౗ • ຊ࣭తͰͳ͍ίʔυ͕ଟ͘ͳΔ໰୊΋

Slide 46

Slide 46 text

ݱঢ়ͷ՝୊ 46 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. • TUVC͕ݺͼग़͞ΕΔ͜ͱΛอূͰ͖ͨ • ຖճ͜ΕΛॻ͘ͷ͸໘౗ • ຊ࣭తͰͳ͍ίʔυ͕ଟ͘ͳΔ໰୊΋ ΋ͬͱָΛ͍ͨ͠ʂ

Slide 47

Slide 47 text

࠷ऴతͳίʔυ 47 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. expectCall( stubHttp(.get, “/api/v1“) { request in ... } ) expectCall( stubHttp(.get, “/api/v2“) { request in ... } ) waitCallExpectation()

Slide 48

Slide 48 text

stubHttp ϝιουͷ֦ு 48 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. func stubHttp(_ method: HTTPMethod, _ path: String, _ builder: @escaping Builder) -> XCTestExpectation { let exp = expectation(description: "request \(method): \(path)") stub(http(method, uri: path)) { request in exp.fulfill() return builder(request) } return exp }

Slide 49

Slide 49 text

stubHttp ϝιουͷ֦ு 49 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. func stubHttp(_ method: HTTPMethod, _ path: String, _ builder: @escaping Builder) -> XCTestExpectation { let exp = expectation(description: "request \(method): \(path)") stub(http(method, uri: path)) { request in exp.fulfill() return builder(request) } return exp } ಺෦Ͱ&YQFDUBUJPOΛੜ੒

Slide 50

Slide 50 text

stubHttp ϝιουͷ֦ு 50 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. func stubHttp(_ method: HTTPMethod, _ path: String, _ builder: @escaping Builder) -> XCTestExpectation { let exp = expectation(description: "request \(method): \(path)") stub(http(method, uri: path)) { request in exp.fulfill() return builder(request) } return exp } TUVC͕ݺͼग़͞ΕͨΒGVMMpMM

Slide 51

Slide 51 text

stubHttp ϝιουͷ֦ு 51 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. func stubHttp(_ method: HTTPMethod, _ path: String, _ builder: @escaping Builder) -> XCTestExpectation { let exp = expectation(description: "request \(method): \(path)") stub(http(method, uri: path)) { request in exp.fulfill() return builder(request) } return exp } &YQFDUBUJPOΛSFUVSOͰฦ͢

Slide 52

Slide 52 text

਌ͷςετΫϥεΛ࡞੒ 52 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. class HttpTestCase: XCTestCase { private var stubHttpCallExpectations: [XCTestExpectation]! } extension HttpTestCase { func expectCall(_ exp: XCTestExpectation) { stubHttpCallExpectations.append(exp) } func waitCallExpectation() { wait(for: stubHttpCallExpectations, timeout: 3) } }

Slide 53

Slide 53 text

਌ͷςετΫϥεΛ࡞੒ 53 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. class HttpTestCase: XCTestCase { private var stubHttpCallExpectations: [XCTestExpectation]! } extension HttpTestCase { func expectCall(_ exp: XCTestExpectation) { stubHttpCallExpectations.append(exp) } func waitCallExpectation() { wait(for: stubHttpCallExpectations, timeout: 3) } } 9$5FTU&YQFDUBUJPOͷ഑ྻΛ༻ҙ

Slide 54

Slide 54 text

਌ͷςετΫϥεΛ࡞੒ 54 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. class HttpTestCase: XCTestCase { private var stubHttpCallExpectations: [XCTestExpectation]! } extension HttpTestCase { func expectCall(_ exp: XCTestExpectation) { stubHttpCallExpectations.append(exp) } func waitCallExpectation() { wait(for: stubHttpCallExpectations, timeout: 3) } } Ҿ਺ʹ౉͞Εͨ&YQFDUBUJPOΛ௥Ճ

Slide 55

Slide 55 text

਌ͷςετΫϥεΛ࡞੒ 55 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. class HttpTestCase: XCTestCase { private var stubHttpCallExpectations: [XCTestExpectation]! } extension HttpTestCase { func expectCall(_ exp: XCTestExpectation) { stubHttpCallExpectations.append(exp) } func waitCallExpectation() { wait(for: stubHttpCallExpectations, timeout: 3) } } ௥Ճ͞Εͨ&YQFDUBUJPOΛXBJU

Slide 56

Slide 56 text

શମ 56 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. class HttpTestCase: XCTestCase { private var stubHttpCallExpectations: [XCTestExpectation]! } extension HttpTestCase { func expectCall(_ exp: XCTestExpectation) { stubHttpCallExpectations.append(exp) } func waitCallExpectation() { wait(for: stubHttpCallExpectations, timeout: 3) } } // ςετίʔυ expectCall( stubHttp(.get, “/api/v1“) { request in ... } ) waitCallExpectation()

Slide 57

Slide 57 text

શମ 57 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. class HttpTestCase: XCTestCase { private var stubHttpCallExpectations: [XCTestExpectation]! } extension HttpTestCase { func expectCall(_ exp: XCTestExpectation) { stubHttpCallExpectations.append(exp) } func waitCallExpectation() { wait(for: stubHttpCallExpectations, timeout: 3) } } // ςετίʔυ expectCall( stubHttp(.get, “/api/v1“) { request in ... } ) waitCallExpectation() ฦ٫͞Εͨ&YQFDUBUJPO͕Ҿ਺ʹ౉Δ

Slide 58

Slide 58 text

શମ 58 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. class HttpTestCase: XCTestCase { private var stubHttpCallExpectations: [XCTestExpectation]! } extension HttpTestCase { func expectCall(_ exp: XCTestExpectation) { stubHttpCallExpectations.append(exp) } func waitCallExpectation() { wait(for: stubHttpCallExpectations, timeout: 3) } } // ςετίʔυ expectCall( stubHttp(.get, “/api/v1“) { request in ... } ) waitCallExpectation() ௥Ճ͞Εͨ&YQFDUBUJPOΛXBJU

Slide 59

Slide 59 text

શମ 59 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. class HttpTestCase: XCTestCase { private var stubHttpCallExpectations: [XCTestExpectation]! } extension HttpTestCase { func expectCall(_ exp: XCTestExpectation) { stubHttpCallExpectations.append(exp) } func waitCallExpectation() { wait(for: stubHttpCallExpectations, timeout: 3) } } // ςετίʔυ expectCall( stubHttp(.get, “/api/v1“) { request in ... } ) waitCallExpectation()

Slide 60

Slide 60 text

·ͱΊ 60 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 61

Slide 61 text

·ͱΊ 61 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. • .PDLJOHKBZ͸4XJGUͷ)5514UVCϥΠϒϥϦ • )551௨৴ͷςετʹ࢖͑Δ • "1*ϥούʔΛॻ͍ͯྑ͔ͬͨ • ৑௕ίʔυ͕গͳ͘ɺҙਤ͕໌֬ʹ • ίʔυิ׬΋շద

Slide 62

Slide 62 text

·ͱΊ 62 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. • .PDLJOHKBZ͸4XJGUͷ)5514UVCϥΠϒϥϦ • )551௨৴ͷςετʹ࢖͑Δ • "1*ϥούʔΛॻ͍ͯྑ͔ͬͨ • ৑௕ίʔυ͕গͳ͘ɺҙਤ͕໌֬ʹ • ίʔυิ׬΋շద )5514UVC͸ ͓֮͑ͯ͘ͱ෢ثͱͯ͠໾ཱ͔ͭ΋ʂʁ

Slide 63

Slide 63 text

એ఻ 63 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.

Slide 64

Slide 64 text

iOSDC ͷ CfP ҰཡΛݟΕΔαʔϏεΛ ϓϥΠϕʔτͰ࡞Γ·ͨ͠ʂ 64 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. h(p://iosdc-cfps.penginmura.tech/ ࠓޙ΋ػೳ௥ՃΛ༧ఆ

Slide 65

Slide 65 text

%F/"͔Β͸ ໊͕ొஃ͠·͢ʂ 65 Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ϒʔε΋΍Γ·͢ʂ

Slide 66

Slide 66 text

&OKPZEFWFMPQNFOU XJUI)551TUVCT 66 Copyright (C) DeNA Co.,Ltd. All Rights Reserved.