JFixture Scala contains a customisation to JFixture that adds support for many of Scala's built in types
Currently, Scala Lists, Sets, Maps and primitives (Int, Byte etc) are supported.
Case classes already work with the base version of JFixture.
Available on Maven Central for:
libraryDependencies += "com.flextrade.jfixture" %% "jfixture-scala" % "1.2.0"
<dependency>
<groupId>com.flextrade.jfixture</groupId>
<artifactId>jfixture-scala_2.13</artifactId>
<version>1.2.0</version>
</dependency>
Include the JFixtureSugar
trait in your test class/test fixture. Then, fixtured values can be created as follows -
val integer = fixture[Int]
val listOfStrings = fixture[List[String]]