scalacheck-generators

Build Status Latest version License

Features

  • Parameterized class generators
  • Nested fields generation
  • Huge list of supported types
  • Custom Arbitrary injection
  • Scala ADT support
  • Zero dependencies

Usage

Add it to your sbt:

libraryDependencies += "com.github.fsanaulla" %% "scalacheck-generators" % <version> % Provided

Use it:

import com.github.fsanaulla.scalacheck.Arb
import scala.concurrent.Future
  
case class Info(str: String,
                char: Char,                 
                int: Int,
                double: Double,
                long: Long)

case class RichTest[T](info: T,
                       i: List[Int],
                       opt: Option[String],
                       fut: Future[Double],
                       optLst: Option[List[T]])

implicit val testGen: Arbitrary[RichTest[T]] = Arb.smart[RichTest[T]]

// propertie base tests