TempServiceTests¶
Namespace: UnitTests.Services
Unit tests for the TempService class, verifying temperature operations.
Inheritance Object → TempServiceTests
Constructors¶
TempServiceTests()¶
Methods¶
GetCoordinates_ApiErrorCode_ShouldNotInsert()¶
Tests that the GetCoordinate function does not insert anything if the api returns a message with an error code.
Returns¶
GetCoordinates_WhenExistingEntry_ShouldNotCallAPi()¶
Tests that the GetCoordinates function does not call the api when there is an entry in the database.
Returns¶
GetCoordinates_WhenMissingFields_ShouldNotInsert()¶
Tests that the GetCoordinates function does not insert anything into the database, when there are missing fields in the JSON response.
Returns¶
GetCoordinates_WhenNoExistingEntry_ShouldCallApi()¶
Tests that the GetCoordinates function calls the api when there is no existing entry in the database.
Returns¶
Setup()¶
Sets up test fixtures and initializes mocks before each test execution.