fixture-monkey-kotlin
Features
- Using objectIntrospector
PrimaryConstructorArbitraryGenerator
- Extensions, Kotlin DSL Exp see
Exp
Kotlin DSL for generating type-safe expression.
- Manipulation name has a suffix
exp
orexpGetter
- Using method reference.
into
,intoGetter
is used for referencing a field in the field.[index]
,["*"]
is used for referencing an element in a container.
manipulation name | nested field | element | |
---|---|---|---|
Java Class | expGetter | intoGetter | [index], ["*"] |
Kotlin Class | exp | into | [index], ["*"] |
How-to
1. Adding dependency
testImplementation("com.navercorp.fixturemonkey:fixture-monkey-kotlin:1.1.0")
<dependency>
<groupId>com.navercorp.fixturemonkey</groupId>
<artifactId>fixture-monkey-kotlin</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
2. Adding option plugin
FixtureMonkey fixtureMonkey = FixtureMonkey.builder()
.plugin(KotlinPlugin())
.build();