Skip to content

Instantly share code, notes, and snippets.

@ambantis
Created October 12, 2013 18:59
Show Gist options
  • Save ambantis/6953600 to your computer and use it in GitHub Desktop.
Save ambantis/6953600 to your computer and use it in GitHub Desktop.
Using ScalaTest, a unit test of a lazy val json to object validator
@DoNotDiscover
class DbUserTest extends FunSpec with Matchers with EitherValues with DbUserJson {
describe("A DbUser") {
describe("Should be instantiated from valid json") {
validUserJson.validate[DbUser].left.get.email should be("bart@simpsons.com")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment