Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override func setUp() {
- super.setUp()
- // Put setup code here. This method is called before the invocation of each test method in the class.
- }
- override func tearDown() {
- // Put teardown code here. This method is called after the invocation of each test method in the class.
- super.tearDown()
- }
- func test_Authentication_Positive() {
- // given
- let authenticationExpectation = expectation(description: "Authentication")
- var authentication = Authentication()
- let params: [String: AnyObject] = [
- "userName": "user@abc.com" as AnyObject,
- "password": "User12345" as AnyObject ]
- // when
- Authentication.auth(params: params, success: { (result) in
- authentication = result
- authenticationExpectation.fulfill()
- }, failure: { (error) in
- print(error)
- })
- // then
- waitForExpectations(timeout: 2) { _ in
- XCTAssertNotNil(authentication)
- XCTAssertEqual(authentication.name, "Alaattin Bedir")
- }
- }
Add Comment
Please, Sign In to add comment