Search in sources :

Example 1 with IsJson

use of com.artipie.IsJson in project artipie by artipie.

the class VersionSliceTest method returnVersionOfApplication.

@Test
void returnVersionOfApplication() {
    final ArtipieProperties proprts = new ArtipieProperties();
    MatcherAssert.assertThat(new VersionSlice(proprts), new SliceHasResponse(Matchers.allOf(new RsHasStatus(RsStatus.OK), new RsHasBody(new IsJson(new JsonContains(new JsonHas("version", new JsonValueIs(proprts.version())))))), new RequestLine(RqMethod.GET, "/.version")));
}
Also used : RequestLine(com.artipie.http.rq.RequestLine) SliceHasResponse(com.artipie.http.hm.SliceHasResponse) RsHasStatus(com.artipie.http.hm.RsHasStatus) RsHasBody(com.artipie.http.hm.RsHasBody) ArtipieProperties(com.artipie.misc.ArtipieProperties) JsonContains(wtf.g4s8.hamcrest.json.JsonContains) IsJson(com.artipie.IsJson) JsonHas(wtf.g4s8.hamcrest.json.JsonHas) JsonValueIs(wtf.g4s8.hamcrest.json.JsonValueIs) Test(org.junit.jupiter.api.Test)

Aggregations

IsJson (com.artipie.IsJson)1 RsHasBody (com.artipie.http.hm.RsHasBody)1 RsHasStatus (com.artipie.http.hm.RsHasStatus)1 SliceHasResponse (com.artipie.http.hm.SliceHasResponse)1 RequestLine (com.artipie.http.rq.RequestLine)1 ArtipieProperties (com.artipie.misc.ArtipieProperties)1 Test (org.junit.jupiter.api.Test)1 JsonContains (wtf.g4s8.hamcrest.json.JsonContains)1 JsonHas (wtf.g4s8.hamcrest.json.JsonHas)1 JsonValueIs (wtf.g4s8.hamcrest.json.JsonValueIs)1