Skip to content

Commit 976f98c

Browse files
author
Fernando López
committed
Update 601 and 602
1 parent 9940eea commit 976f98c

10 files changed

Lines changed: 181 additions & 52 deletions

features/601.ngsild.Intro_Scorpio.feature

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Feature: test tutorial 601 Introduction to Linked Data (Scorpio)
6060
When I prepare a GET HTTP request for "obtaining entity data by Id" to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001"
6161
And I set header Accept to application/ld+json
6262
And I perform the request
63-
Then I receive a HTTP "200" response code from Scorpio with the body equal to "response601-05.json"
63+
Then I receive a HTTP "200" response code from Scorpio with the body equal to "response601-05-array.json"
6464

6565

6666
#
@@ -74,7 +74,8 @@ Feature: test tutorial 601 Introduction to Linked Data (Scorpio)
7474
#
7575
Scenario: [6] OBTAIN ENTITY DATA BY TYPE
7676
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
77-
And With header 'Link$<https://smartdatamodels.org/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
77+
And With header 'Link$<https://smart-data-models.github.io/dataModel.Building/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
78+
And I set header Accept to application/ld+json
7879
And With parameters "type$Building$options$keyValues"
7980
Then I receive from Scorpio "200" response code with the body equal to "response601-06.json"
8081

@@ -88,7 +89,8 @@ Feature: test tutorial 601 Introduction to Linked Data (Scorpio)
8889
#
8990
Scenario: [7] FILTER CONTEXT DATA BY COMPARING THE VALUES OF AN ATTRIBUTE
9091
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
91-
And With header 'Link$<https://smartdatamodels.org/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
92+
And With header 'Link$<https://smart-data-models.github.io/dataModel.Building/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
93+
And I set header Accept to application/ld+json
9294
And With parameters "type$Building$q$name=="Checkpoint Markt"$options$keyValues"
9395
Then I receive from Scorpio "200" response code with the body equal to "response601-07.json"
9496

@@ -102,7 +104,7 @@ Feature: test tutorial 601 Introduction to Linked Data (Scorpio)
102104
#
103105
Scenario: [8] FILTER CONTEXT DATA BY COMPARING THE VALUES OF AN ATTRIBUTE IN AN ARRAY
104106
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
105-
And With header 'Link$<https://smartdatamodels.org/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
107+
And With header 'Link$<https://smart-data-models.github.io/dataModel.Building/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
106108
And With parameters "type$Building$q$category=="commercial","office"$options$keyValues"
107109
Then I receive from Scorpio "200" response code with the body equal to "response601-08.json"
108110

@@ -116,7 +118,8 @@ Feature: test tutorial 601 Introduction to Linked Data (Scorpio)
116118
#
117119
Scenario: [9] FILTER CONTEXT DATA BY COMPARING THE VALUES OF A SUB-ATTRIBUTE
118120
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
119-
And With header 'Link$<https://smartdatamodels.org/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
121+
And With header 'Link$<https://smart-data-models.github.io/dataModel.Building/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
122+
And I set header Accept to application/ld+json
120123
And With parameters "type$Building$q$address[addressLocality]=="Kreuzberg"$options$keyValues"
121124
Then I receive from Scorpio "200" response code with the body equal to "response601-09.json"
122125

@@ -130,7 +133,7 @@ Feature: test tutorial 601 Introduction to Linked Data (Scorpio)
130133
#
131134
Scenario: [10] FILTER CONTEXT DATA BY QUERYING METADATA
132135
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
133-
And With header 'Link$<https://smartdatamodels.org/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
136+
And With header 'Link$<https://smart-data-models.github.io/dataModel.Building/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
134137
And With parameters "type$Building$q$address.verified==true$options$keyValues"
135138
Then I receive from Scorpio "200" response code with the body equal to "response601-10.json"
136139

@@ -144,6 +147,6 @@ Feature: test tutorial 601 Introduction to Linked Data (Scorpio)
144147
#
145148
Scenario: [11] FILTER CONTEXT DATA BY COMPARING THE VALUES OF A GEO:JSON ATTRIBUTE
146149
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
147-
And With header 'Link$<https://smartdatamodels.org/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
150+
And With header 'Link$<https://smart-data-models.github.io/dataModel.Building/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/json"'
148151
And With parameters "type$Building$geometry$Point$coordinates$[13.3777,52.5162]$georel$near;maxDistance==2000$options$keyValues"
149152
Then I receive from Scorpio "200" response code with the body equal to "response601-11.json"

features/601.ngsild.Intro_Stellio.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Feature: test tutorial 601 Introduction to Linked Data (Stellio)
4646
And I set header Accept to application/ld+json
4747
And the params equal to "type=https://smartdatamodels.org/dataModel.Building/Building"
4848
And I perform the request
49-
Then I receive a HTTP "200" response code from Stellio with the body equal to "response601-04-array.json"
49+
Then I receive a HTTP "200" response code from Stellio with the body equal to "response601-04.json"
5050

5151

5252
Scenario: [5] OBTAIN ENTITY DATA BY ID
@@ -77,7 +77,7 @@ Feature: test tutorial 601 Introduction to Linked Data (Stellio)
7777
Scenario: [8] FILTER CONTEXT DATA BY COMPARING THE VALUES OF AN ATTRIBUTE IN AN ARRAY
7878
When I set the "Accept" header with the value "application/ld+json"
7979
And I set the "Link" header with the value "<https://smart-data-models.github.io/dataModel.Building/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
80-
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities?type=Building&q=category==%22commercial%22,%22office%22&options=keyValues"
80+
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities?type=Building&q=category==%22commercial%22,%22office%22&options=keyValues&expandValues=category"
8181
And I send a GET HTTP request to that url
8282
Then I receive from Stellio "200" response code with the body equal to "response601-08.json"
8383

features/602.ngsild.RelationshipsAndDataModels_Scorpio.feature

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
2727
# 2) attribute 'name' expected first, instead it is second after attribute 'https://schema.org/address'
2828
#
2929
Scenario: [1] DISPLAY ALL entities of a given type (BUILDINGS)
30-
When I send GET HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities"
30+
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
3131
And With header 'NA$NA'
3232
And With parameters "type$https://uri.fiware.org/ns/data-models#Building$options$keyValues"
3333
Then I receive from Scorpio "200" response code with the body equal to "response602-01.json"
@@ -39,7 +39,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
3939
# 1) attribute 'name' expected first, instead it is last
4040
#
4141
Scenario: [2] DISPLAY ALL entities of a given type (PRODUCT)
42-
When I send GET HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities"
42+
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
4343
And With header 'Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
4444
And With parameters "type$https://fiware.github.io/tutorials.Step-by-Step/schema/Product$options$keyValues"
4545
Then I receive from Scorpio "200" response code with the body equal to "response602-02.json"
@@ -51,7 +51,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
5151
# 1) attribute 'name' expected first, instead it is second after 'maxCapacity' attribute
5252
#
5353
Scenario: [3] DISPLAY ALL entities of a given type (SHELF)
54-
When I send GET HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities"
54+
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
5555
And With header 'Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
5656
And With parameters "type$Shelf$options$keyValues"
5757
Then I receive from Scorpio "200" response code with the body equal to "response602-03.json"
@@ -63,7 +63,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
6363
# 1) attributes order completely mixed-up. Expected: name, maxCapacity, location, Current: location, maxCapacity, name
6464
#
6565
Scenario: [4] OBTAIN SHELF INFORMATION
66-
When I send GET HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/"
66+
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/"
6767
And With header 'Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
6868
And With parameters "options$keyValues"
6969
Then I receive from Scorpio "200" response code with the body equal to "response602-04.json"
@@ -73,7 +73,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
7373
# Request 5
7474
#
7575
Scenario Outline: [5] ADDING 1-1 RELATIONSHIPS
76-
When I send POST HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/attrs"
76+
When I send POST HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/attrs"
7777
# And With the post header "fiware-servicepath": " /"
7878
And With the post header "NA": "NA"
7979
And With the body request described in an Scorpio file "<file>"
@@ -100,7 +100,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
100100
# 4) attributes requestedBy, installedBy, statusOfWork miss the indication of the schema (https://fiware.github.io/tutorials.Step-by-Step/schema/)
101101
#
102102
Scenario: [6] OBTAIN THE UPDATED SHELF
103-
When I send GET HTTP request to "http://localhost:9090/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001"
103+
When I send GET HTTP request to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001"
104104
Then I receive a HTTP "200" response code from Scorpio with the body equal to "response602-06.json"
105105

106106

@@ -112,7 +112,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
112112
# current: 'https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld'
113113
#
114114
Scenario: [7] FIND THE STORE IN WHICH A SPECIFIC SHELF IS LOCATED
115-
When I send GET HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/"
115+
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/"
116116
And With header 'Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
117117
And With parameters "attrs$locatedIn$options$keyValues"
118118
Then I receive from Scorpio "200" response code with the body equal to "response602-07.json"
@@ -122,7 +122,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
122122
# Request 8
123123
#
124124
Scenario: [8] FIND THE IDS OF ALL SHELF UNITS IN A STORE
125-
When I send GET HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities/"
125+
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/"
126126
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
127127
And With parameters "type$Shelf$options$keyValues$attrs$locatedIn"
128128
Then I receive from Scorpio "200" response code with the body equal to "response602-08.json"
@@ -132,7 +132,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
132132
# Request 9
133133
#
134134
Scenario Outline: [9] ADDING 1-MANY RELATIONSHIP
135-
When I send POST HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001/attrs"
135+
When I send POST HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001/attrs"
136136
And With the post header "NA": "NA"
137137
And With the body request described in an Scorpio file "<file>"
138138
Then I receive a HTTP response with the following Scorpio data
@@ -148,7 +148,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
148148
# Request 10
149149
#
150150
Scenario: [10] FINDING ALL SHELF UNITS FOUND WITHIN A STORE
151-
When I send GET HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001"
151+
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001"
152152
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
153153
And With parameters "options$keyValues$attrs$furniture"
154154
Then I receive from Scorpio "200" response code with the body equal to "response602-10.json"
@@ -158,7 +158,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
158158
# Request 11
159159
#
160160
Scenario Outline: [11] CREATING COMPLEX RELATIONSHIPS
161-
When I send POST HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities/"
161+
When I send POST HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/"
162162
And With the post header "NA": "NA"
163163
And With the body request described in an Scorpio file "<file>"
164164
Then I receive a HTTP response with the following Scorpio data
@@ -174,7 +174,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
174174
# Request 12
175175
#
176176
Scenario: [12] FINDING ALL SHELF UNITS FOUND WITHIN A STORE
177-
When I send GET HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities/"
177+
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/"
178178
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
179179
And With parameters "type$StockOrder$q$orderedProduct=="urn:ngsi-ld:Product:001"$attrs$requestedFor$options$keyValues"
180180
Then I receive from Scorpio "200" response code with the body equal to "response602-12.json"
@@ -184,7 +184,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
184184
# Request 13
185185
#
186186
Scenario: [13] FIND ALL PRODUCTS SOLD IN A STORE
187-
When I send GET HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities/"
187+
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/"
188188
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
189189
And With parameters "type$StockOrder$q$requestedFor=="urn:ngsi-ld:Building:store001"$attrs$orderedProduct$options$keyValues"
190190
Then I receive from Scorpio "200" response code with the body equal to "response602-13.json"
@@ -200,7 +200,7 @@ Feature: test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
200200
# current attributes order: type, requestedFor, requestedBy, orderedProduct, stockCount, orderDate
201201
#
202202
Scenario: [14] OBTAIN STOCK ORDER
203-
When I send GET HTTP request to Scorpio at "http://localhost:9090/ngsi-ld/v1/entities/urn:ngsi-ld:StockOrder:001"
203+
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:StockOrder:001"
204204
And With header 'NA$NA'
205205
And With parameters "options$keyValues"
206206
Then I receive from Scorpio "200" response code with the body equal to "response602-14.json"

0 commit comments

Comments
 (0)