v3.5.2
Java-time field assertions and date matchers
Full notes
Added
- BSON-aware date matchers. Added
dateAfter,dateBefore,dateAtOrAfter,dateAtOrBeforeanddateEqualTotoMongoFieldMatchers. They accept Java-time values directly, support an explicit persistence timezone, and compare at BSON millisecond precision. Tests cover type combinations, strict and inclusive boundaries, DST, invalid values, extreme dates, and plain JUnit seeds plus Spring writes and Extended JSON seeds. Available inbonsai-junitand transitively inbonsai-spring-boot.
Fixed
- Java-time field assertions. BSON dates now compare with
LocalDate,LocalDateTime,Instant,OffsetDateTimeandZonedDateTimeat millisecond precision. Local values use the JVM timezone by default;hasField(name, expected, zone)supports mappings that use another timezone. ALocalDatematches only its start-of-day instant. The same equality applies inside lists and throughvalueEqualTo, in both the plain JUnit and Spring harnesses.