Skip to content

Conversation

@cnsgithub
Copy link
Contributor

@cnsgithub cnsgithub commented Dec 7, 2018

Introduced a new RestAssuredRestDocumentationWrapper that can be used for REST Asssured documentation.

RestAssured.given(this.spec)
    .accept("application/json")
    .filter(RestAssuredRestDocumentationWrapper.document("{method-name}"))
    .when().get("/")
    .then()
    .assertThat().statusCode(is(200));
}

@mduesterhoeft
Copy link
Contributor

Awesome - thanks a lot for your PR. I will have a deeper look at it over the weekend.

@coveralls
Copy link

coveralls commented Dec 8, 2018

Coverage Status

Coverage decreased (-0.3%) to 94.526% when pulling 9df75e7 on cnsgithub:rest-assured-support into aa604ed on ePages-de:master.

@cnsgithub cnsgithub force-pushed the rest-assured-support branch from f28538f to 55f9c7b Compare December 10, 2018 12:46
RestAssured limitations removed
Remove the dependency to a specific spring-restdocs client from
the restdocs-api-spec module and create two new modules:
- restdocs-api-spec-mockmvc
  Contains the wrapper for spring-restdocs-mockmvnc
- restdocs-api-spec-restassured
  Contains the wrapper for spring-restdocs-restassured
@cnsgithub cnsgithub force-pushed the rest-assured-support branch from 60993d7 to 6dd3ac8 Compare December 20, 2018 13:53
Copy link
Contributor

@mduesterhoeft mduesterhoeft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for the contribution. This looks very good. I would just ask you to remove the sharing of test code between the new modules and go for code duplication instead.

Optionally if you find the time a simple sample for the restassured support would be great.

@ExtendWith(SpringExtension::class)
@WebMvcTest
class MockMvcRestDocumentationWrapperIntegrationTest(@Autowired mockMvc: MockMvc) : ResourceSnippetIntegrationTest(mockMvc) {
class MockMvcRestDocumentationWrapperIntegrationTest(@Autowired private val mockMvc: MockMvc) : ResourceSnippetIntegrationTest() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would rather not share code between the tests. Mainly because I think the gradle setup for this is a little exotic and also complex. I would rather go for the code duplication here.

@mduesterhoeft mduesterhoeft merged commit f8411a7 into ePages-de:master Dec 21, 2018
@mduesterhoeft
Copy link
Contributor

I will build a release tonight - I would like to add a few things to the readme first.

@mduesterhoeft
Copy link
Contributor

Released with 0.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants