我在下面提供了一个 POJO,
@Setter
@Getter
public class OrderDto extends BaseDto {
@JsonProperty( "products" )
private final List<String> products;
@JsonProperty( "basket_items" )
private final List<BasketItemDto> basketItems;
@JsonProperty( "timestamp" )
@JsonDeserialize( using = JavaOffsetDateTimeDeserializer.class )
@JsonSerialize( using = JavaOffsetDateTimeSerializer.class )
private OffsetDateTime timestamp;
@JsonProperty( "amount" )
private BigDecimal amount;
@JsonProperty( "shop_id" )
private Integer shopId;
..........................
}
我想测试该timestamp字段是否是OffsetDateTime数据类型。
有可能吗?我该如何编写测试?
ibeautiful
慕工程0101907
相关分类