twitter / summingbird

Streaming MapReduce with Scalding and Storm
https://twitter.com/summingbird
Apache License 2.0
2.14k stars 267 forks source link

Add ability to create test Sources from scalacheck.Gen #142

Open johnynek opened 11 years ago

johnynek commented 11 years ago

If someone has a scalacheck.Gen[T] it should be good as a P#Source[T].

johnynek commented 10 years ago

Probably we want:

implicit def scaldingSource[T](implicit arb: Arbitrary[T]): Arbitrary[Source[Scalding, T]]
implicit def stormSource[T](implicit arb: Arbitrary[T]): Arbitrary[Source[Storm, T]]

So we can reuse existing Gen[T]/Arbitrary[T] to build Sources. We probably don't want laws on whole runs, which are really integration tests and don't seem to play well with scalacheck + these frameworks (cascading/storm), but it is still good to have one API to use to generate input instances.