Slide 25
Slide 25 text
ߪೖࣦഊͷςετ
func testFailed() throws {
// ߪೖΛࣦഊͤ͞Δ
session.failTransactionsEnabled = true
session.failureError = .invalidSignature
// ߪೖ
try session.buyProduct(productIdentifier: ProductId.premium.rawValue)
XCTAssertEqual(session.allTransactions()[0].state, .failed)
// ߪೖঢ়ଶͷ֬ೝ
XCTAssertFalse(PurchaseManager.shared.isAvailable(for: .premium))
}
sessionͰfailઃఆΛ͢Δͱ
ڧ੍తʹߪೖࣦഊͤ͞Δ͜ͱ͕Ͱ͖Δ