Created
January 12, 2014 01:54
-
-
Save ElderMael/8379563 to your computer and use it in GitHub Desktop.
Trying to use Hamcrest Matchers in Scala
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
private def checkHttpStatus(response: Future[HttpResponse]) { | |
val statusCode = Await.result(response, 10 seconds).status | |
println(s"Status code: ${statusCode.intValue}") | |
assertThat(s"Expected 200 OK or 304 Not Modified, received ${statusCode.intValue}", | |
statusCode.intValue, | |
CoreMatchers.anyOf(CoreMatchers.equalTo(200), CoreMatchers.equalTo(304))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See: JamesIry/scala@975a19c