nacyolsa
01/10/2024, 1:44 PMKev
01/10/2024, 1:47 PMnacyolsa
01/10/2024, 1:48 PMLeoColman
01/10/2024, 1:49 PMLeoColman
01/10/2024, 1:49 PMLeoColman
01/10/2024, 1:50 PMnacyolsa
01/10/2024, 1:50 PMnacyolsa
01/10/2024, 1:51 PMLeoColman
01/10/2024, 1:52 PMbind
?nacyolsa
01/10/2024, 1:52 PMLeoColman
01/10/2024, 1:53 PMLeoColman
01/10/2024, 1:53 PMnacyolsa
01/10/2024, 1:54 PMLeoColman
01/10/2024, 1:54 PMEmil Kantis
01/10/2024, 3:52 PMEmil Kantis
01/10/2024, 3:53 PMAdam S
01/10/2024, 8:07 PM@Serializable
classes https://kotlinlang.slack.com/archives/CT0G9SD7Z/p1647451898560189nacyolsa
01/11/2024, 9:52 AMArb.string()
I need to use `Arb.alphanumeric()`or positiveInt()/int() with Reflective Arbs I would have problem with this in many places because they won't know what exactly kind of Arb is needed.sam
01/13/2024, 4:33 AMSkel
01/16/2024, 9:08 AMArb
.
It can generate an Arb
instance like Reflective Arbs
does, customizing the property with Arb
or any other type.
It is the example below.
class StringObject(val string: String)
val arb = FixtureMonkey.builder()
.plugin(KotestPlugin())
.plugin(KotlinPlugin())
.build()
.giveMeArb<StringObject> { setArb(StringObject::string, Arb.zipcodes()) }
nacyolsa
01/16/2024, 9:29 AMsam
01/16/2024, 2:10 PMLeoColman
01/16/2024, 2:53 PMnacyolsa
01/16/2024, 3:46 PMdata class A(val id: Int, val assignments: List<Int>)
How can I configure FixtureMonkey to put id
into assignments
? I mean FixtureMonkey generates id
and puts it into ``assignments`` without generating it again with random number.Skel
01/24/2024, 4:08 AMthenApply
API.
FixtureMonkey.builder()
.plugin(KotlinPlugin())
.build()
.giveMeBuilder<A>()
.minSizeExp(A::assignments, 1)
.thenApply { a, builder ->
builder.setExp(A::assignments[0], a.id)
}
.sample()
If you do not want to use this API again, then check out register
option in FixtureMonkeyBuilder.
If you have additional questions, please ask on the GitHub issue!