Created
May 3, 2019 17:44
-
-
Save SURYAKANTSHARMA/e41f3264c7fc14c4891b23a784cfd14e to your computer and use it in GitHub Desktop.
testAppraisal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testAppraisal() { | |
let user = User(name: "John", salary: 100.0) | |
let result = Appraisal(user: user, rating: PerformanceRating.exceedExpection).perform() | |
switch result { | |
case .bonus(let amount): | |
XCTAssertTrue(amount == 200.0) | |
default: | |
XCTFail("Appraisal Perform function is faulty") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment