Skip to content

Commit

Permalink
Add example to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Stein Fletcher committed Feb 27, 2019
1 parent ebdeb26 commit 00f32e3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# apitest-plantuml

Coming soon...

Formats the results of an [apitest](https://github.com/steinfletcher/apitest) run as plant uml markup.

Example: [diagram](https://www.plantuml.com/plantuml/svg/fPFBJiCm44NtynMZhAX4IPEsI6I1AY6W4aYjrEoHSQUDIs97jhC0nBzZkpoIbaSHMJapetlld3WJOvcsJLM2UH2oPffLA9MbAoNjGZmH9achKocfUA5LHMXrGn3nKaJzyyWqDihmAEdXVBR8CMuCwTWGqxn0y7AenRgmiD-TvlayJauIc2fZCsHrNGhEh50Iu1dGFP5a5JdrQADa12z0SXaIGd1rvbxEUFkqXzUNEHRMrbaSN4pCQh7rIzBXQDm9usTt-pjnWWP0otDhrl_SUTZ3T31u4ovfPU5T8zHdDt3XK9Aq_LkIQrjac9vzbFB7cZfBnnlppUR7sv9O-e8F-oMBMjEAD4bEWSYeGwJL37kttt_0ip-sGwarq67L3jCYDluxiT6Xn8IvuswISSlkIyykNDCzK2wClxakpEaXOIHnRvKXBvMX_tozt-B1n1tzt_WA)
Example: [diagram](https://www.plantuml.com/plantuml/svg/fPFBJiCm44NtynMZhAX4IPEsI6I1AY6W4aYjrEoHSQUDIs97jhC0nBzZkpoIbaSHMJapetlld3WJOvcsJLM2UH2oPffLA9MbAoNjGZmH9achKocfUA5LHMXrGn3nKaJzyyWqDihmAEdXVBR8CMuCwTWGqxn0y7AenRgmiD-TvlayJauIc2fZCsHrNGhEh50Iu1dGFP5a5JdrQADa12z0SXaIGd1rvbxEUFkqXzUNEHRMrbaSN4pCQh7rIzBXQDm9usTt-pjnWWP0otDhrl_SUTZ3T31u4ovfPU5T8zHdDt3XK9Aq_LkIQrjac9vzbFB7cZfBnnlppUR7sv9O-e8F-oMBMjEAD4bEWSYeGwJL37kttt_0ip-sGwarq67L3jCYDluxiT6Xn8IvuswISSlkIyykNDCzK2wClxakpEaXOIHnRvKXBvMX_tozt-B1n1tzt_WA)

![Diagram](/testdata/plantuml.png?raw=true "Sequence Diagram")


```go
apiTest("gets the user").
Report(plantuml.NewFormatter(myWriter)).
Mocks(getPreferencesMock, getUserMock).
Post("/user/search").
Body(`{"name": "jon"}`).
Expect(t).
Status(http.StatusOK).
Header("Content-Type", "application/json").
Body(`{"name": "jon", "is_contactable": true}`).
End()
```
Binary file added testdata/plantuml.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 00f32e3

Please sign in to comment.