Skip to content

Instantly share code, notes, and snippets.

@nishabe
Last active February 8, 2019 04:38
Show Gist options
  • Save nishabe/5ace3a9f5b6d3397c9c918f2ddb5043b to your computer and use it in GitHub Desktop.
Save nishabe/5ace3a9f5b6d3397c9c918f2ddb5043b to your computer and use it in GitHub Desktop.
unitTestSample
// This test verfies the value of actual string is equal to the epected string
func test_behaviorBeingTested_contextItsTestedUnder() {
// Given
let objectUnderTest = SomeClass()
// When
objectUnderTest.performSomeAction()
let expected: String = "The expected change"
let actual: String = objectUnderTest.text
// Then
XCTAssertEqual(expected, actual)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment