Skip to content

UserInfoControllerIntegrationTests

Namespace: IntegrationTests.Controllers

Integration tests for the User Info Controller to verify user management, profile operations, and access control
functionality.

public class UserInfoControllerIntegrationTests : IntegrationTests.Infrastructure.ApiClientTestBase

Inheritance ObjectIntegrationTestBaseApiClientTestBaseUserInfoControllerIntegrationTests

Constructors

UserInfoControllerIntegrationTests()

public UserInfoControllerIntegrationTests()

Methods

ChangePassword_WithInvalidCurrentPassword_ReturnsBadRequest()

Tests password change with invalid current password and verifies proper error response handling.

public Task ChangePassword_WithInvalidCurrentPassword_ReturnsBadRequest()

Returns

Task

ChangePassword_WithoutToken_ReturnsUnauthorized()

Tests password change without authentication token and verifies 401 Unauthorized response.

public void ChangePassword_WithoutToken_ReturnsUnauthorized()

DeleteUser_WithNonExistentUserId_ReturnsNotFound()

Tests user deletion with non-existent user ID and verifies 404 Not Found response or proper error handling.

public Task DeleteUser_WithNonExistentUserId_ReturnsNotFound()

Returns

Task

DeleteUser_WithUserToken_ReturnsForbidden()

Tests user deletion with user token and verifies 403 Forbidden response for insufficient privileges.

public Task DeleteUser_WithUserToken_ReturnsForbidden()

Returns

Task

GetAllUsers_WithAdminToken_ReturnsOk()

Tests retrieving all users with admin privileges and verifies successful response or proper error handling.

public Task GetAllUsers_WithAdminToken_ReturnsOk()

Returns

Task

GetAllUsers_WithoutToken_ReturnsUnauthorized()

Tests retrieving all users without authentication token and verifies 401 Unauthorized response.

public Task GetAllUsers_WithoutToken_ReturnsUnauthorized()

Returns

Task

GetAllUsers_WithUserToken_ReturnsForbidden()

Tests retrieving all users with user token and verifies 403 Forbidden response for insufficient privileges.

public Task GetAllUsers_WithUserToken_ReturnsForbidden()

Returns

Task

GetUserById_WithInvalidUserId_ReturnsNotFound()

Tests retrieving user by invalid ID and verifies 404 Not Found response or proper error handling.

public Task GetUserById_WithInvalidUserId_ReturnsNotFound()

Returns

Task

GetUserById_WithoutToken_ReturnsUnauthorized()

Tests retrieving user by ID without authentication token and verifies 401 Unauthorized response.

public void GetUserById_WithoutToken_ReturnsUnauthorized()