Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The token usernameErik is defined as "eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.ewogICAgIm5hbWUiOiAiRXJpayIKfQ==.2d2c39f777b16f75c701e851e9ec20d45f4134a281155e0c6f909876228d7d80".

DAO Response

The response from the database is set manually, because testing is not a valid reason to change data in the database. Whenever a call is made to the DAO, the response will be set manually aswell, to prevent the test from testing more than one class.

...

3

Name

Expected result

Parameters

Actual result

SuccessComments
1getSettingsWithGoodJWT()A 200 response code.token = usernameErik
sensor = "Oil temperature"
Returns a 200 response code, which means that the response is OK.2Yes
2getSettingsWithWithWrongJWT()A 403 response code.token = "WrongToken"
sensor = "Oil temperature"
Returns a 403 response code, which means it was a FORBIDDEN request.Yes

Table 16: Tests in SensorSettingsResourceTest

...