Scala FakeIt is a library for generating test data without boilerplate code.
WARNING: THIS IS A PREVIEW VERSION
Simple to use:
import fakeit._
case class Person(name: String, age: Int)
val fakedPerson = fake[Person]()
Also, you can override some properties with your own random generator.
import fakeit._
case class Person(name: String, age: Int)
val fakedPerson = fake[Person](_.name -> ("fakedName" + next[String]))
Add dependency and repository by adding to your build.sbt
.
libraryDependencies += "scalafakeit" %% "scalafakeit" % "0.0.2"
resolvers += "gustavoamigo" at "http://dl.bintray.com/content/gustavoamigo/maven"
If you're using Docker, you can run:
$ docker-compose run --rm sbt
Scala FakeIt
is open source software released under the Apache 2.0 License.
See the LICENSE file for details.