Fixkture is an Intellij Plugin to generate test fixtures that supports both Java and Kotlin. It helps generate complex objects from a target class, which may be long and exhausting to do manually, especially for big objects. It does so by providing arbitrary parameters in the object's constructor.
Given the sample data class
data class Example(
val first: String,
val second: List<String>
)
This is a really simple class, but the plugin will easily support generating an extremely complex object with nested objects in it.
The generated fixture will look like this
val example = Example(first = "first", second = listOf("second"))
The library will use standard library functions to achieve fixture generation in as little code as possible while keeping the fixture extremely readable.
Here is the output code for the exact same class in Java
public static final Example example = new Example("first", List.of("second"));
Again, standard functions of Java 11 are used to generate the fixture components.
You can download the plugin from the Plugin Marketplace and follow the instructions detailed in the documentation of the plugin.
You can contribute to this project by forking it and opening your own PR or by creating issues to propose improvements or report bugs.