I'd like to use ScalaTest's Checkers trait to use ScalaCheck from ScalaTest cases.
A simple case I'm playing with is:
test("can create local date UTC from millis") {
check(localDate.toTimestampUTC.toLocalDateUTC == localDate)
}
I need to create a arbitrary LocalDate, so I tried this:
object ArbitraryValues {
implicit def abc(): Arbitrary[LocalDate] = Arbitrary(Gen.choose(new LocalDate(0L), new LocalDate(Long.MaxValue)))
}
It doesn't compile, saying,
error: could not find implicit value for parameter c: org.scalacheck.Choose[org.joda.time.LocalDate] implicit val abc: Arbitrary[LocalDate] = Arbitrary(Gen.choose(new LocalDate(0L), new LocalDate(Long.MaxValue)))
and
error: not found: value localDate check(localDate.toTimestampUTC.toLocalDateUTC == localDate)