...
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.
...
Name | Expected result | Parameters | Actual result | Success | Comments | ||
---|---|---|---|---|---|---|---|
1 | getSettingsWithGoodJWT() | A 200 response code. | token = usernameErik sensor = "Oil temperature" | Returns a 200 response code, which means that the response is OK. | 2 | Yes | |
2 | getSettingsWithWithWrongJWT() | A 403 response code. | token = "WrongToken" sensor = "Oil temperature" | Returns a 403 response code, which means it was a FORBIDDEN request. | Yes | 3
Table 16: Tests in SensorSettingsResourceTest
...