// // APITest.swift // GMERemittanceTests // // Created by InKwon Devik Kim on 03/05/2019. // Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. // import XCTest @testable import GME_Remit class APITest: XCTestCase { func testFecthRecipients() { let expt = expectation(description: "testFecthRecipients") let service = RecipientsService() service.fetchRecipients( success: { print($0.accounts?.count ?? 0) print($0.recipients?.count ?? 0) XCTAssert(true) expt.fulfill() }, failure: { XCTAssert(false, $0.localizedDescription) expt.fulfill() } ) wait(for: [expt], timeout: 1000.0) } func testLoadFormKYC() { let service = NewRegisterStep1Service() let expt = expectation(description: "testLoadFormKYC") server = .uat service.fetchInformation( success: { XCTAssert($0.cities?.count != 0 , "cities data is wrong") XCTAssert($0.idTypes?.count != 0 , "idTypes data is wrong") XCTAssert($0.branches?.count != 0 , "branches data is wrong") XCTAssert($0.banks?.count != 0 , "banks data is wrong") expt.fulfill() }, failure: { XCTAssert(false, $0.localizedDescription) expt.fulfill() } ) wait(for: [expt], timeout: 5.0) } }