Introduction
Satisfaketion
Satisfaketion is a library for generating beautiful fake data in Kotlin.
Satisfaketion is broken into three main library modules
Core
Generators
Mutators
Core
The engine that powers Satisfaketion. Instantiating a satisfaketion object is as easy as declaring the helper function.
Once a Faker has been instantiated, type-safe generators can be associated with each member of the class.
Faker
Generator
A Generator
is a functional interface that declares a single method generate
An example generator for a naive phone number could be
Mutator
A Mutator
is another functional interface
Mutators allow you to take an existing Generator
and mutate it, allowing for expansive reuse of base generators.
Let's say you have a data class MyPerson
using the existing EnglishName
generators (from the generator module), you can declare a satisfaketion instance, with mutators to add weighted mutability to the prefix
and suffix
fields
This would cause approximately 25% of generated objects to have a null field for prefix
and/or suffix
Last updated