Skip to content

Instantly share code, notes, and snippets.

@victorpanitz
Last active October 26, 2019 20:14
Show Gist options
  • Save victorpanitz/d8ca4e0e1642ac7cc3cde1064bfdea46 to your computer and use it in GitHub Desktop.
Save victorpanitz/d8ca4e0e1642ac7cc3cde1064bfdea46 to your computer and use it in GitHub Desktop.
func test_Validation_Case_1() {
given("valueA is false, valueB is true and valueC is false") { _ in
let a = false
let b = true
let c = false
when("validation is called") { _ in
sut.validation(valueA: a, valueB: b, valueC: c)
then("should call setup method passing a, b and c."){ _ in
XCTAssertEqual(view.setupCalled, true)
XCTAssertEqual(view.setupValueAPassed, false)
XCTAssertEqual(view.setupValueBPassed, true)
XCTAssertEqual(view.setupValueCPassed, false)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment