Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed May 21, 2024
1 parent 85a0eee commit c74bdc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 52 deletions.
28 changes: 2 additions & 26 deletions test/unit/ngsiv2/amqpBinding-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,7 @@ describe('AMQP Transport binding: measures', function () {
contextBrokerMock
.matchHeader('fiware-service', 'smartgondor')
.matchHeader('fiware-servicepath', '/gardens')
.post(
'/v2/entities?options=upsert',
utils.readExampleFile('./test/unit/ngsiv2/contextRequests/singleMeasure.json')
)
.reply(204);

contextBrokerMock
.matchHeader('fiware-service', 'smartgondor')
.matchHeader('fiware-servicepath', '/gardens')
.post(
'/v2/entities?options=upsert',
utils.readExampleFile('./test/unit/ngsiv2/contextRequests/secondSingleMeasure.json')
)
.post('/v2/op/update', utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multimeasure.json'))
.reply(204);
});

Expand All @@ -248,19 +236,7 @@ describe('AMQP Transport binding: measures', function () {
contextBrokerMock
.matchHeader('fiware-service', 'smartgondor')
.matchHeader('fiware-servicepath', '/gardens')
.post(
'/v2/entities?options=upsert',
utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multipleMeasure.json')
)
.reply(204);

contextBrokerMock
.matchHeader('fiware-service', 'smartgondor')
.matchHeader('fiware-servicepath', '/gardens')
.post(
'/v2/entities?options=upsert',
utils.readExampleFile('./test/unit/ngsiv2/contextRequests/secondMultipleMeasure.json')
)
.post('/v2/op/update', utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multimeasure2.json'))
.reply(204);
});

Expand Down
28 changes: 2 additions & 26 deletions test/unit/ngsiv2/mqttBinding-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,19 +289,7 @@ describe('MQTT Transport binding: measures', function () {
contextBrokerMock
.matchHeader('fiware-service', 'smartgondor')
.matchHeader('fiware-servicepath', '/gardens')
.post(
'/v2/entities?options=upsert',
utils.readExampleFile('./test/unit/ngsiv2/contextRequests/singleMeasure.json')
)
.reply(204);

contextBrokerMock
.matchHeader('fiware-service', 'smartgondor')
.matchHeader('fiware-servicepath', '/gardens')
.post(
'/v2/entities?options=upsert',
utils.readExampleFile('./test/unit/ngsiv2/contextRequests/secondSingleMeasure.json')
)
.post('/v2/op/update', utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multimeasure.json'))
.reply(204);
});

Expand Down Expand Up @@ -329,19 +317,7 @@ describe('MQTT Transport binding: measures', function () {
contextBrokerMock
.matchHeader('fiware-service', 'smartgondor')
.matchHeader('fiware-servicepath', '/gardens')
.post(
'/v2/entities?options=upsert',
utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multipleMeasure.json')
)
.reply(204);

contextBrokerMock
.matchHeader('fiware-service', 'smartgondor')
.matchHeader('fiware-servicepath', '/gardens')
.post(
'/v2/entities?options=upsert',
utils.readExampleFile('./test/unit/ngsiv2/contextRequests/secondMultipleMeasure.json')
)
.post('/v2/op/update', utils.readExampleFile('./test/unit/ngsiv2/contextRequests/multimeasure2.json'))
.reply(204);
});

Expand Down

0 comments on commit c74bdc5

Please sign in to comment.