Description
The library supports java.time.Instant and java.time.Duration but does not yet support java.time.ZonedDateTime. Adding this resolver will allow users to generate random ZonedDateTime instances as part of their test fixtures.
This follows the existing pattern for Java time resolvers: a JavaZonedDateTimeResolver class implementing TypeResolver, registered in SomeConfig.buildResolvers, and covered by unit tests.
Scope
- In scope:
JavaZonedDateTimeResolver, registration in SomeConfig, and unit tests.
- Out of scope: Kotlin
kotlinx.datetime types, OffsetDateTime, or other java.time types.
Acceptance criteria
Description
The library supports
java.time.Instantandjava.time.Durationbut does not yet supportjava.time.ZonedDateTime. Adding this resolver will allow users to generate randomZonedDateTimeinstances as part of their test fixtures.This follows the existing pattern for Java time resolvers: a
JavaZonedDateTimeResolverclass implementingTypeResolver, registered inSomeConfig.buildResolvers, and covered by unit tests.Scope
JavaZonedDateTimeResolver, registration inSomeConfig, and unit tests.kotlinx.datetimetypes,OffsetDateTime, or otherjava.timetypes.Acceptance criteria
java.time.ZonedDateTimetypeWHEN
some<ZonedDateTime>()is calledTHEN a valid
ZonedDateTimeinstance is generatedJavaZonedDateTimeResolverWHEN it resolves a value
THEN the generated instant falls within a reasonable range (e.g., 1970 to 2100)
SomeConfig.buildResolvers()THEN
JavaZonedDateTimeResolveris present in the resolver chain afterJavaDurationResolverJavaZonedDateTimeResolver.canResolve(type)WHEN
typeisString,Int, orjava.time.InstantTHEN it returns
false