Commit Graph

4 Commits

Author SHA1 Message Date
Andy Wilkinson
09a4323ed5 Merge branch '1.2.x' 2019-03-19 11:42:23 +00:00
Andy Wilkinson
99ee889708 Make JUnit Jupiter extension stateless so it can be used in parallel
Previously, REST Docs' JUnit Jupiter extension,
RestDocumentationExtension, stored its own state. Since the code
was written I have learned that this isn't recommended and that the
extension context's store should be used instead. Up until now, we'd
got away with the extension being stateful, but the introduction of
parallel test execution has highlighted the problem.

This commit updates RestDocumentationExtension to use the store from
the execution context rather than storing its own state. An unwanted,
but necessary, side-effect of this is that RestDocumentationExtension
itself no longer implements RestDocumentationContextProvider and,
instead, returns a new type rather than itself when asked to resolve
the provider. This is technically a breaking API change, but users
will be unaffected if they have followed the recommended and
documented approach of injecting RestDocumentationContextProvider.

Closes gh-520
2018-06-26 10:21:30 +01:00
Johnny Lim
59311292ba Correct the documentation generated by the JUnit 5 sample
Closes gh-408
2017-06-29 12:31:30 +01:00
Andy Wilkinson
0e6e785fb0 Add support for JUnit 5
This commit adds support for JUnit 5 and its Jupiter programming
model. A new Jupiter Extension implementation,
RestDocumentationExtension, is provided. This extension can be applied
to a test class to allow it to use Spring REST Docs to document a
RESTful API.

Closes gh-296
2017-05-19 17:29:12 +02:00