Skip to content

Commit

Permalink
improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Gourlay committed Feb 10, 2016
1 parent 82f755c commit 4b6791c
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ReadmeExample extends CornichonFeature {
| "Fire and Blood" | "2011-06-19" | "10" | "8.4" | "tt1851397" |
""")

And assert body.path("Episodes").asArray.hasize(10)
And assert body.path("Episodes").asArray.hasSize(10)

And assert body.path("Episodes[0]").is(
"""
Expand Down Expand Up @@ -213,7 +213,7 @@ body.whiteListing.is(
""")
```

Ignored keys are JsonPaths, two formats are currently supported:
Ignored keys and extractors are JsonPaths, two formats are currently supported:

- Typed based root.a.b.c(int).d
- String based "a.b.c[int].d" (implicit conversion to the Typed style)
Expand Down Expand Up @@ -318,7 +318,7 @@ Repeat(3) {
```scala
Eventually(maxDuration = 15.seconds, interval = 200.milliseconds) {

When I GET("http://superhero.io/random")
When I get("http://superhero.io/random")

Then assert body.ignoring("hasSuperpowers", "publisher").is(
"""
Expand Down Expand Up @@ -406,7 +406,7 @@ The engine will try its best to provide a meaningful error message, if a specifi
DetailedStepAssertion[A](expected: A, result: A, details: A String)
```

The engine will feed the actual reasult to the ```details``` function.
The engine will feed the actual result to the ```details``` function.

In practice the simplest runnable statement in the DSL is

Expand All @@ -427,15 +427,15 @@ The ```session``` is used to store the result of a computation in order to reuse
When I EffectStep(
title = "run crazy computation",
action = s => {
val res = crazy-computation()
s.add("result", res.infos)
val pi = piComputation()
s.add("result", res)
})

Then assert AssertStep(
title = "check computation infos",
action = s => {
val resInfos = s.get("result")
StepAssertion(resInfos, "Everything is fine")
val pi = s.get("result")
StepAssertion(pi, 3.14)
})
```

Expand Down Expand Up @@ -507,7 +507,7 @@ It is also possible to inject random values inside placeholders using:
- ```<timestamp>``` for the current timestamp

```scala
POST("http://url.io/somethingWithAnId", payload = """
post("http://url.io/somethingWithAnId", payload = """
{
"id" : "<random-uuid>"
}
Expand Down Expand Up @@ -562,8 +562,6 @@ and then only provide the missing part in the HTTP step definition
```scala
When I get("/superheroes/Batman")

When I post("/superheroes", payload ="")

When I delete("/superheroes/GreenLantern")

```
Expand Down

0 comments on commit 4b6791c

Please sign in to comment.