Search Results for

    Show / Hide Table of Contents

    Class Test_PasswordResetWorkflow

    Integration tests for the complete password reset workflow with organization branding.

    Inheritance
    object
    Test_PasswordResetWorkflow
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OEMS.IntegrationTests.Application
    Assembly: OEMS.UnitTests.dll
    Syntax
    [TestClass]
    public sealed class Test_PasswordResetWorkflow
    Remarks

    This test class verifies the end-to-end password reset process including:

    • Database operations for users, organizations, and tokens
    • Email template generation with organization branding
    • Email sending with branded templates
    • Token lifecycle management (creation, validation, expiration, usage)
    • Multi-user scenarios and concurrent operations

    Following testkonzept guidelines for integration tests:

    • Tests database interactions
    • Verifies component integration
    • Covers common-case and critical scenarios
    • Tests performance and stability

    Methods

    CompletePasswordResetWorkflow_BrandedOrganization_Success()

    Tests the complete password reset workflow for a user with organization branding.

    Declaration
    [TestMethod]
    public Task CompletePasswordResetWorkflow_BrandedOrganization_Success()
    Returns
    Type Description
    Task
    Remarks

    Integration test: End-to-end password reset with database operations. Verifies complete workflow from initiation to confirmation with branding.

    CompletePasswordResetWorkflow_DefaultOrganization_Success()

    Tests the complete password reset workflow for a user without organization branding.

    Declaration
    [TestMethod]
    public Task CompletePasswordResetWorkflow_DefaultOrganization_Success()
    Returns
    Type Description
    Task
    Remarks

    Integration test: End-to-end password reset with default styling. Verifies workflow works correctly when no custom branding is available.

    ConcurrentPasswordResetAttempts_SameUser_HandledCorrectly()

    Tests multiple password reset attempts for the same user.

    Declaration
    [TestMethod]
    public Task ConcurrentPasswordResetAttempts_SameUser_HandledCorrectly()
    Returns
    Type Description
    Task
    Remarks

    Integration test: Multiple token handling and management. Verifies system handles multiple reset attempts correctly.

    ExpiredPasswordResetToken_NotRetrievedAsValid()

    Tests password reset token expiration handling.

    Declaration
    [TestMethod]
    public Task ExpiredPasswordResetToken_NotRetrievedAsValid()
    Returns
    Type Description
    Task
    Remarks

    Database integration test: Token expiration logic. Verifies expired tokens are handled correctly in database queries.

    MultipleUsersPasswordReset_Performance_WithinAcceptableLimits()

    Tests password reset performance with multiple users and organizations.

    Declaration
    [TestMethod]
    public Task MultipleUsersPasswordReset_Performance_WithinAcceptableLimits()
    Returns
    Type Description
    Task
    Remarks

    Performance integration test: System scalability. Verifies system can handle multiple concurrent operations efficiently.

    PasswordResetToken_DatabaseOperations_Success()

    Tests password reset token persistence and retrieval from database.

    Declaration
    [TestMethod]
    public Task PasswordResetToken_DatabaseOperations_Success()
    Returns
    Type Description
    Task
    Remarks

    Database integration test: Token CRUD operations. Verifies token repository correctly stores and retrieves tokens.

    PasswordReset_DatabaseFailure_HandledGracefully()

    Tests password reset workflow resilience to database connection issues.

    Declaration
    [TestMethod]
    public Task PasswordReset_DatabaseFailure_HandledGracefully()
    Returns
    Type Description
    Task
    Remarks

    Resilience integration test: Error handling and recovery. Verifies system gracefully handles database operation failures.

    PasswordReset_NonExistentUser_HandledGracefully()

    Tests password reset with non-existent user email.

    Declaration
    [TestMethod]
    public Task PasswordReset_NonExistentUser_HandledGracefully()
    Returns
    Type Description
    Task
    Remarks

    Database integration test: Non-existent data handling. Verifies system handles missing user data gracefully.

    SetUp()

    Sets up integration test environment with in-memory database and real repositories.

    Declaration
    [TestInitialize]
    public Task SetUp()
    Returns
    Type Description
    Task
    Remarks

    Creates a clean database for each test to ensure isolation. Uses real repository implementations to test actual database operations.

    TearDown()

    Cleans up test resources after each test

    Declaration
    [TestCleanup]
    public void TearDown()
    In this article
    Back to top Generated by DocFX