flextradeukltd / jfixture-scala   1.2.0

GitHub

Customisations for JFixture to make it more useful when writing Scala

Scala versions: 2.13 2.12 2.11

JFixture Scala

JFixture Scala contains a customisation to JFixture that adds support for many of Scala's built in types

Build Status

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:

  • Scala 2.11: maven central
  • Scala 2.12: maven central
  • Scala 2.13: maven central

SBT

libraryDependencies += "com.flextrade.jfixture" %% "jfixture-scala" % "1.2.0"

Maven

<dependency>
	<groupId>com.flextrade.jfixture</groupId>
	<artifactId>jfixture-scala_2.13</artifactId>
	<version>1.2.0</version>
</dependency>

Example

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]]