Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created July 7, 2020 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencurtis/589129a595238db29efb3c75ebcf10db to your computer and use it in GitHub Desktop.
Save stevencurtis/589129a595238db29efb3c75ebcf10db to your computer and use it in GitHub Desktop.
testgettasks
func testGetTasks() {
let CDM = CoreDataManagerMock()
let viewController = ViewControllerFactory().create(CDM)
guard let vc = viewController else {
return XCTFail("Could not instantiate ViewController")
}
vc.loadViewIfNeeded()
vc.tableView?.reloadData()
let actualCell = viewController?.tableView!.cellForRow(at: IndexPath(row: 0, section: 0) )
XCTAssertEqual("Enter your task from Mock", actualCell?.textLabel?.text)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment