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)