You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Kirk Lund <kl...@apache.org> on 2016/09/08 16:56:25 UTC
json-path-assert for json related unit tests
To support fixing up unit tests that involve json, I'd like to add in a
dependency on com.jayway.jsonpath:json-path-assert.
We already have a dependency on com.jayway.jsonpath:json-path (for
spring-hateoas). json-path-assert basically adds some new Hamcrest matchers
for clean assertions involving json.
I intend to use this in TypedJsonJUnitTest (GEODE-1842) because that
test doesn't currently have assertions(!).
-Kirk
Re: json-path-assert for json related unit tests
Posted by Kirk Lund <kl...@apache.org>.
I think we were using the version of Jackson that was tied to the version
of Swagger we were using. In our pre-gradle build, we were pulling in
Jackson from directories for Swagger on gcm/where.
If we upgrade Jackson and Spring, then we should check our versions of
Swagger (do we have automated tests that exercise Geode's use of Swagger?).
Current versions of those are:
swagger.version = 1.3.2
swagger-springmvc.version = 0.8.2
-Kirk
On Thu, Sep 8, 2016 at 12:30 PM, Anthony Baker <ab...@pivotal.io> wrote:
> Speaking of jackson, anyone know why we’re not using v2.2.0 for the scala
> module? This is a dependency of geode-web-api.
>
> jackson.version = 2.2.0
> jackson-module-scala_2.10.version = 2.1.5
>
>
> Anthony
>
> > On Sep 8, 2016, at 10:32 AM, John Blum <jb...@pivotal.io> wrote:
> >
> > +1 to standardizing Geode on Jackson for JSON processing.
> >
> > +1 to using JsonPath/json-path-assert for testing interactions in Geode
> on
> > JSON docs.
> >
> > On Thu, Sep 8, 2016 at 10:22 AM, Kirk Lund <kl...@apache.org> wrote:
> >
> >> Yes, we should change all json parsing code to use jackson. However, we
> >> still need to write unit tests and that's what json-path-assert is for.
> >> I've researched all of the ways to perform json assertions for unit
> tests
> >> and test-path-assert is currently the best. It's from com.jayway same as
> >> Awaitility.
> >>
> >> -Kirk
> >>
> >>
> >> On Thu, Sep 8, 2016 at 10:06 AM, Jinmei Liao <ji...@pivotal.io> wrote:
> >>
> >>> Can we get rid of TypedJson in favor of some standard json libraries?
> >>>
> >>> On Thu, Sep 8, 2016 at 9:56 AM, Kirk Lund <kl...@apache.org> wrote:
> >>>
> >>>> To support fixing up unit tests that involve json, I'd like to add in
> a
> >>>> dependency on com.jayway.jsonpath:json-path-assert.
> >>>>
> >>>> We already have a dependency on com.jayway.jsonpath:json-path (for
> >>>> spring-hateoas). json-path-assert basically adds some new Hamcrest
> >>> matchers
> >>>> for clean assertions involving json.
> >>>>
> >>>> I intend to use this in TypedJsonJUnitTest (GEODE-1842) because that
> >>>> test doesn't currently have assertions(!).
> >>>>
> >>>> -Kirk
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Cheers
> >>>
> >>> Jinmei
> >>>
> >>
> >
> >
> >
> > --
> > -John
> > 503-504-8657
> > john.blum10101 (skype)
>
>
Re: json-path-assert for json related unit tests
Posted by Jinmei Liao <ji...@pivotal.io>.
I just made a change to upgrade jackson and scala module to 2.8.2
On Thu, Sep 8, 2016 at 12:30 PM, Anthony Baker <ab...@pivotal.io> wrote:
> Speaking of jackson, anyone know why we’re not using v2.2.0 for the scala
> module? This is a dependency of geode-web-api.
>
> jackson.version = 2.2.0
> jackson-module-scala_2.10.version = 2.1.5
>
>
> Anthony
>
> > On Sep 8, 2016, at 10:32 AM, John Blum <jb...@pivotal.io> wrote:
> >
> > +1 to standardizing Geode on Jackson for JSON processing.
> >
> > +1 to using JsonPath/json-path-assert for testing interactions in Geode
> on
> > JSON docs.
> >
> > On Thu, Sep 8, 2016 at 10:22 AM, Kirk Lund <kl...@apache.org> wrote:
> >
> >> Yes, we should change all json parsing code to use jackson. However, we
> >> still need to write unit tests and that's what json-path-assert is for.
> >> I've researched all of the ways to perform json assertions for unit
> tests
> >> and test-path-assert is currently the best. It's from com.jayway same as
> >> Awaitility.
> >>
> >> -Kirk
> >>
> >>
> >> On Thu, Sep 8, 2016 at 10:06 AM, Jinmei Liao <ji...@pivotal.io> wrote:
> >>
> >>> Can we get rid of TypedJson in favor of some standard json libraries?
> >>>
> >>> On Thu, Sep 8, 2016 at 9:56 AM, Kirk Lund <kl...@apache.org> wrote:
> >>>
> >>>> To support fixing up unit tests that involve json, I'd like to add in
> a
> >>>> dependency on com.jayway.jsonpath:json-path-assert.
> >>>>
> >>>> We already have a dependency on com.jayway.jsonpath:json-path (for
> >>>> spring-hateoas). json-path-assert basically adds some new Hamcrest
> >>> matchers
> >>>> for clean assertions involving json.
> >>>>
> >>>> I intend to use this in TypedJsonJUnitTest (GEODE-1842) because that
> >>>> test doesn't currently have assertions(!).
> >>>>
> >>>> -Kirk
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Cheers
> >>>
> >>> Jinmei
> >>>
> >>
> >
> >
> >
> > --
> > -John
> > 503-504-8657
> > john.blum10101 (skype)
>
>
--
Cheers
Jinmei
Re: json-path-assert for json related unit tests
Posted by Anthony Baker <ab...@pivotal.io>.
Speaking of jackson, anyone know why we’re not using v2.2.0 for the scala module? This is a dependency of geode-web-api.
jackson.version = 2.2.0
jackson-module-scala_2.10.version = 2.1.5
Anthony
> On Sep 8, 2016, at 10:32 AM, John Blum <jb...@pivotal.io> wrote:
>
> +1 to standardizing Geode on Jackson for JSON processing.
>
> +1 to using JsonPath/json-path-assert for testing interactions in Geode on
> JSON docs.
>
> On Thu, Sep 8, 2016 at 10:22 AM, Kirk Lund <kl...@apache.org> wrote:
>
>> Yes, we should change all json parsing code to use jackson. However, we
>> still need to write unit tests and that's what json-path-assert is for.
>> I've researched all of the ways to perform json assertions for unit tests
>> and test-path-assert is currently the best. It's from com.jayway same as
>> Awaitility.
>>
>> -Kirk
>>
>>
>> On Thu, Sep 8, 2016 at 10:06 AM, Jinmei Liao <ji...@pivotal.io> wrote:
>>
>>> Can we get rid of TypedJson in favor of some standard json libraries?
>>>
>>> On Thu, Sep 8, 2016 at 9:56 AM, Kirk Lund <kl...@apache.org> wrote:
>>>
>>>> To support fixing up unit tests that involve json, I'd like to add in a
>>>> dependency on com.jayway.jsonpath:json-path-assert.
>>>>
>>>> We already have a dependency on com.jayway.jsonpath:json-path (for
>>>> spring-hateoas). json-path-assert basically adds some new Hamcrest
>>> matchers
>>>> for clean assertions involving json.
>>>>
>>>> I intend to use this in TypedJsonJUnitTest (GEODE-1842) because that
>>>> test doesn't currently have assertions(!).
>>>>
>>>> -Kirk
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers
>>>
>>> Jinmei
>>>
>>
>
>
>
> --
> -John
> 503-504-8657
> john.blum10101 (skype)
Re: json-path-assert for json related unit tests
Posted by John Blum <jb...@pivotal.io>.
+1 to standardizing Geode on Jackson for JSON processing.
+1 to using JsonPath/json-path-assert for testing interactions in Geode on
JSON docs.
On Thu, Sep 8, 2016 at 10:22 AM, Kirk Lund <kl...@apache.org> wrote:
> Yes, we should change all json parsing code to use jackson. However, we
> still need to write unit tests and that's what json-path-assert is for.
> I've researched all of the ways to perform json assertions for unit tests
> and test-path-assert is currently the best. It's from com.jayway same as
> Awaitility.
>
> -Kirk
>
>
> On Thu, Sep 8, 2016 at 10:06 AM, Jinmei Liao <ji...@pivotal.io> wrote:
>
> > Can we get rid of TypedJson in favor of some standard json libraries?
> >
> > On Thu, Sep 8, 2016 at 9:56 AM, Kirk Lund <kl...@apache.org> wrote:
> >
> > > To support fixing up unit tests that involve json, I'd like to add in a
> > > dependency on com.jayway.jsonpath:json-path-assert.
> > >
> > > We already have a dependency on com.jayway.jsonpath:json-path (for
> > > spring-hateoas). json-path-assert basically adds some new Hamcrest
> > matchers
> > > for clean assertions involving json.
> > >
> > > I intend to use this in TypedJsonJUnitTest (GEODE-1842) because that
> > > test doesn't currently have assertions(!).
> > >
> > > -Kirk
> > >
> >
> >
> >
> > --
> > Cheers
> >
> > Jinmei
> >
>
--
-John
503-504-8657
john.blum10101 (skype)
Re: json-path-assert for json related unit tests
Posted by Kirk Lund <kl...@apache.org>.
Yes, we should change all json parsing code to use jackson. However, we
still need to write unit tests and that's what json-path-assert is for.
I've researched all of the ways to perform json assertions for unit tests
and test-path-assert is currently the best. It's from com.jayway same as
Awaitility.
-Kirk
On Thu, Sep 8, 2016 at 10:06 AM, Jinmei Liao <ji...@pivotal.io> wrote:
> Can we get rid of TypedJson in favor of some standard json libraries?
>
> On Thu, Sep 8, 2016 at 9:56 AM, Kirk Lund <kl...@apache.org> wrote:
>
> > To support fixing up unit tests that involve json, I'd like to add in a
> > dependency on com.jayway.jsonpath:json-path-assert.
> >
> > We already have a dependency on com.jayway.jsonpath:json-path (for
> > spring-hateoas). json-path-assert basically adds some new Hamcrest
> matchers
> > for clean assertions involving json.
> >
> > I intend to use this in TypedJsonJUnitTest (GEODE-1842) because that
> > test doesn't currently have assertions(!).
> >
> > -Kirk
> >
>
>
>
> --
> Cheers
>
> Jinmei
>
Re: json-path-assert for json related unit tests
Posted by Jinmei Liao <ji...@pivotal.io>.
Can we get rid of TypedJson in favor of some standard json libraries?
On Thu, Sep 8, 2016 at 9:56 AM, Kirk Lund <kl...@apache.org> wrote:
> To support fixing up unit tests that involve json, I'd like to add in a
> dependency on com.jayway.jsonpath:json-path-assert.
>
> We already have a dependency on com.jayway.jsonpath:json-path (for
> spring-hateoas). json-path-assert basically adds some new Hamcrest matchers
> for clean assertions involving json.
>
> I intend to use this in TypedJsonJUnitTest (GEODE-1842) because that
> test doesn't currently have assertions(!).
>
> -Kirk
>
--
Cheers
Jinmei