Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CollectiveHealth-gists/a15df734a49ff2cda145ffdf46a7fcf9 to your computer and use it in GitHub Desktop.
Save CollectiveHealth-gists/a15df734a49ff2cda145ffdf46a7fcf9 to your computer and use it in GitHub Desktop.
Testing iOS at Collective Health: A Sample Test
func testAnnotationConfig() {
let providers = generateTestProviders()
let model = SearchResultsMapViewModel(searchLocation: nil, details: providers)
let annotation = model.getAnnotations().first as! GetCareAnnotation
let indexPath = NSIndexPath(forRow: 0, inSection: 0)
let details = SearchResultsMapViewModel.configForAnnotation(annotation)
XCTAssertEqual(details.title, "Bob Boberson")
XCTAssertEqual(details.subtitle, "Plastic Surgery")
XCTAssertEqual(details.type, AnnotationType.Doctor)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment