LocationControllerIntegrationTests¶
Namespace: IntegrationTests.Controllers
Integration tests for the Location Controller to verify postal code management and location-based functionality.
Inheritance Object → IntegrationTestBase → ApiClientTestBase → LocationControllerIntegrationTests
Constructors¶
LocationControllerIntegrationTests()¶
Methods¶
GetAllPostalcodes_WithAdminToken_ReturnsOk()¶
Tests retrieving all postal codes with admin token and verifies successful response.
Returns¶
GetAllPostalcodes_WithoutToken_ThrowsUnauthorizedException()¶
Tests retrieving postal codes without authentication token and verifies 401 Unauthorized response.
GetAllPostalcodes_WithValidUserToken_ReturnsOk()¶
Tests retrieving all postal codes with valid user token and verifies successful response.
Returns¶
InsertLocation_WithAdminToken_ReturnsOk()¶
Tests inserting a new location with admin privileges and verifies successful operation.
Returns¶
InsertLocation_WithoutToken_ThrowsUnauthorizedException()¶
Tests inserting a location without authentication token and verifies 401 Unauthorized response.
InsertLocation_WithUserToken_ThrowsForbiddenException()¶
Tests inserting a location with user token and verifies 403 Forbidden response for insufficient privileges.
Returns¶
RemovePostalcode_WithoutToken_ThrowsUnauthorizedException()¶
Tests removing a postal code without authentication token and verifies 401 Unauthorized response.
RemovePostalcode_WithValidToken_ReturnsOkOrNotFound()¶
Tests removing a postal code with valid authentication and verifies successful deletion or proper error handling.