-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoginTests.swift
More file actions
43 lines (33 loc) · 1.23 KB
/
Copy pathLoginTests.swift
File metadata and controls
43 lines (33 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// LoginTests.swift
// PowerHomeTests
//
// Created by Francisco Javier Chacon de Dios on 11/02/18.
// Copyright © 2018 Francisco Javier Chacon de Dios. All rights reserved.
//
import XCTest
@testable import PowerHome
class LoginTests: XCTestCase {
var loginViewController: LoginViewController?
override func setUp() {
super.setUp()
loginViewController = LoginViewController()
_ = loginViewController?.view
// 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()
loginViewController = nil
}
func loginViewControllerInitializesProperly() {
loginViewController?.loginView.dismissKeyboard(Any.self)
XCTAssertNotNil(loginViewController)
}
func testConformsUITextFieldDelegateProtocolShouldBeTrue() {
XCTAssert((loginViewController?.loginView.conforms(to: UITextFieldDelegate.self))!)
}
func testTextFieldShouldReturnTrueValue() {
XCTAssert((loginViewController?.loginView.textFieldShouldReturn(UITextField()))!)
}
}