TopicControllerIntegrationTests¶
Namespace: IntegrationTests.Controllers
Integration tests for the Topic Controller to verify MQTT topic management and sensor configuration functionality.
Inheritance Object → IntegrationTestBase → ApiClientTestBase → TopicControllerIntegrationTests
Constructors¶
TopicControllerIntegrationTests()¶
Methods¶
CreateTopic_WithAdminToken_AndValidData_ReturnsCreated()¶
Tests creating a new MQTT topic with admin privileges and valid data configuration.
Returns¶
CreateTopic_WithInvalidData_ReturnsBadRequest()¶
Tests creating a topic with null data and verifies proper exception handling for invalid input.
Returns¶
CreateTopic_WithoutToken_ReturnsUnauthorized()¶
Tests creating a topic without authentication token and verifies 401 Unauthorized response.
CreateTopic_WithUserToken_ReturnsForbidden()¶
Tests creating a topic with user token and verifies 403 Forbidden response for insufficient privileges.
Returns¶
GetAllSensorTypes_ReturnsOk()¶
Tests retrieving all sensor types and verifies successful response or proper error handling.
Returns¶
GetAllTopics_WithAdminToken_ReturnsOk()¶
Tests retrieving all topics with admin privileges and verifies successful response or proper error handling.
Returns¶
GetAllTopics_WithoutToken_ReturnsUnauthorized()¶
Tests retrieving all topics without authentication token and verifies 401 Unauthorized response.
GetAllTopics_WithUserToken_ReturnsForbidden()¶
Tests retrieving all topics with user token and verifies 403 Forbidden response for insufficient privileges.
Returns¶
UpdateTopic_WithAdminToken_ReturnsOk()¶
Tests updating an existing MQTT topic with admin privileges and verifies successful modification.
Returns¶
UpdateTopic_WithUserToken_ReturnsForbidden()¶
Tests updating a topic with user token and verifies 403 Forbidden response for insufficient privileges.