Updated test in JsonData.test.cs #456
No reviewers
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K!456
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "#406-tempSensorMockup-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
-The tests were failing due to a change in the response structure of the temperature endpoint, which now returns an array instead of a single object.
-The test is updated so it iterate over the array and validate each item.
-The test passes now.
Issue: #406
Review on #456
What’s done
I checked that the test in JsonData.test.cs was updated to handle the new response structure from the /temperature endpoint.
Tested on Windows using PowerShell
Running dotnet test from the repo root did not work because of project/solution reference issues in this branch
I instead ran the relevant test project directly:
dotnet test .\generateMockup\tempSensorMockup\tempSensorMockup.Tests\tempSensorMockup.Tests.csproj
All tests pass (4/4)
Only warnings related to MQTTnet showed up
Inspected file
generateMockup/tempSensorMockup/tempSensorMockup.Tests/JsonData.test.cs
Code review
The test has been updated to validate an array response instead of a single object, which matches the PR description. The checks for sensorId, timestamp, and temperature are still covered, and the relevant test project passes.
There are a couple of minor things that could be cleaned up, like unused using statements and some formatting inconsistencies, but nothing that looks blocking.
Conclusion
I think this is ready to be merged.
Manually Merged, well done!
Pull request closed