Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func testPerformanceExample() {
- // This is an example of a performance test case.
- self.measure {
- // Put the code you want to measure the time of here.
- }
- }
- func testTitle() {
- let storyboard = UIStoryboard(name: "Main", bundle: nil)
- let vc = storyboard.instantiateInitialViewController() as! ViewController
- vc.viewDidLoad()
- XCTAssertEqual("HELLO TEST", vc.title)
- }
- func testTextField() {
- let storyboard = UIStoryboard(name: "Main", bundle: nil)
- let vc = storyboard.instantiateInitialViewController() as! ViewController
- vc.viewDidLoad()
- XCTAssertEqual("ANOTHER TEST", vc.testTextField.placeholder)
- }
- func testVowels(){
- let storyboard = UIStoryboard(name: "Main", bundle: nil)
- let vc = storyboard.instantiateInitialViewController() as! ViewController
- vc.viewDidLoad()
- XCTAssertEqual(1, vc.vowelsInAString(string: "Bomb"))
- XCTAssertEqual(5, vc.vowelsInAString(string: "murcielago"))
- }
- func testConvertTitle() {
- let storyboard = UIStoryboard(name: "Main", bundle: nil)
- let vc = storyboard.instantiateInitialViewController() as! ViewController
- vc.viewDidLoad()
- XCTAssertEqual("This Is A Test", vc.makeTitle(string: "this is a test"))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement