You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Nicolas Peltier <np...@adobe.com> on 2016/03/15 22:39:28 UTC

[sling mock] is it possible to mock a Date property

with resource resolver mock ? doc says it slightly different, but how concretely are we supposed to serialise date values?

Thanks,
Nicolas

Re: [sling mock] is it possible to mock a Date property

Posted by Nicolas Peltier <np...@adobe.com>.
Thanks Stefan!

i can see it there "dateISO8601String": "2014-04-22T15:11:24.000+02:00"
> On 15 Mar 2016, at 22:41, Stefan Seifert <ss...@pro-vision.de> wrote:
> 
> you mean using the resource API/value map and an underlying resourceresolver mock repository?
> you should be able to just put either Date or Calender objects to the value map and read them again.
> 
> you can also have a look at the sling mock unit tests, that are several testcases for date/calendar values.
> 
> stefan
> 
>> -----Original Message-----
>> From: Nicolas Peltier [mailto:npeltier@adobe.com]
>> Sent: Tuesday, March 15, 2016 10:39 PM
>> To: users@sling.apache.org
>> Subject: [sling mock] is it possible to mock a Date property
>> 
>> with resource resolver mock ? doc says it slightly different, but how
>> concretely are we supposed to serialise date values?
>> 
>> Thanks,
>> Nicolas
> 


RE: [sling mock] is it possible to mock a Date property

Posted by Stefan Seifert <ss...@pro-vision.de>.
you mean using the resource API/value map and an underlying resourceresolver mock repository?
you should be able to just put either Date or Calender objects to the value map and read them again.

you can also have a look at the sling mock unit tests, that are several testcases for date/calendar values.

stefan

>-----Original Message-----
>From: Nicolas Peltier [mailto:npeltier@adobe.com]
>Sent: Tuesday, March 15, 2016 10:39 PM
>To: users@sling.apache.org
>Subject: [sling mock] is it possible to mock a Date property
>
>with resource resolver mock ? doc says it slightly different, but how
>concretely are we supposed to serialise date values?
>
>Thanks,
>Nicolas