diff options
| author | Eugen Wissner <belka@caraus.de> | 2018-11-10 20:06:38 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2018-11-10 20:06:38 +0100 |
| commit | 15e5e413d9a49012202c46f8fde747c1593ec0f1 (patch) | |
| tree | b790d38e296e2979ce9b048f57852a04bba401ff /data-tables/features/json.feature | |
| parent | 5d535973f330ede481f0bf2906ec187d726ddf80 (diff) | |
| download | cucumber-js-demo-15e5e413d9a49012202c46f8fde747c1593ec0f1.tar.gz | |
Add code
Diffstat (limited to 'data-tables/features/json.feature')
| -rw-r--r-- | data-tables/features/json.feature | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/data-tables/features/json.feature b/data-tables/features/json.feature new file mode 100644 index 0000000..176efc6 --- /dev/null +++ b/data-tables/features/json.feature @@ -0,0 +1,69 @@ +Feature: + As the owner of a book collection + I want to be able to generate JSON containing titles from this collection + + Scenario: + Given the following books by Simon Frank are in the collection: + | id | title | + | 1 | Der Gegenstand des Wissens | + | 2 | Lebendiges Wissen | + When I stringify it + Then I should get: + """ + [{ + "id": 1, + "title": "Der Gegenstand des Wissens" + },{ + "id": 2, + "title": "Lebendiges Wissen" + }] + """ + + Given the following books by Søren Kierkegaard are in the collection: + | id | title | + | 1 | Die Krankheit zum Tode | + | 2 | Entweder-Oder | + When I stringify it + Then I should get: + """ + [{ + "id": 1, + "title": "Die Krankheit zum Tode" + },{ + "id": 2, + "title": "Entweder-Oder" + }] + """ + + Given the following book is in the collection: + | id | 1 | + | title | Leonce und Lena | + | author | Georg Büchner | + When I stringify it + Then I should get: + """ + { + "id": 1, + "title": "Leonce und Lena", + "author": "Georg Büchner" + } + """ + + Given the following books are in the collection: + | Friedrich Nietzsche | Die Geburt der Tragödie | + | Jacques Derrida | Die unbedingte Universität | + | Honoré de Balzac | Die Frau von 30 Jahren | + When I stringify it + Then I should get: + """ + [{ + "author": "Friedrich Nietzsche", + "title": "Die Geburt der Tragödie" + },{ + "author": "Jacques Derrida", + "title": "Die unbedingte Universität" + },{ + "author": "Honoré de Balzac", + "title": "Die Frau von 30 Jahren" + }] + """ |
