Skip to content

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

License

Notifications You must be signed in to change notification settings

scalaprops/scalaprops-magnolia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scalaprops-magnolia

build.sbt

libraryDependencies += "com.github.scalaprops" %% "scalaprops-magnolia" % "0.9.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, Cogen}
import scalaprops.ScalapropsMagnoliaGen._
import scalaprops.ScalapropsMagnoliaCogen._

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

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Languages