Asserting on case classes in ScalaTest

Viewed 2986

I see there's support for the Option type, but what about custom case classes?

I sort of want to do this:

result match {
  case SuccessCase(values) => {
    values.foo should be ("bar")
  }
  case FailureCase => // should fail test, but how to say this in ScalaTest?
}
3 Answers
Related