scalaprops / scalaprops-magnolia

Generation of arbitrary case classes / ADTs instances with Scalaprops and Magnolia

GitHub

scalaprops-magnolia

Build Status scaladoc

build.sbt

for jvm

libraryDependencies += "com.github.scalaprops" %% "scalaprops-magnolia" % "0.3.0"

for scala-js

libraryDependencies += "com.github.scalaprops" %%% "scalaprops-magnolia" % "0.3.0"

example

Import the content of scalaprop.ScalapropsMagnolia close to where you want scalaprops.Gen type classes to be automatically available for case classes / sealed hierarchies,

import scalaprops.Gen
import scalaprops.ScalapropsMagnolia._

sealed trait X 
case class Y(value: Boolean) extends X
case class Z(value: Int) extends X

Gen[X] // automatically available Gen[X] instance !