Files
admin/_docs/02_document/modules/test_user_service_test.md
T
2026-04-16 06:25:36 +03:00

1.2 KiB

Module: Azaion.Test.UserServiceTest

Purpose

xUnit integration test for UserService.CheckHardwareHash against a live PostgreSQL database.

Public Interface

Test Description
CheckHardwareHashTest Looks up a known user by email, then calls CheckHardwareHash with a hardware fingerprint string

Internal Logic

  • Creates a DbFactory with hardcoded connection strings pointing to a remote PostgreSQL instance.
  • Creates a UserService with that factory and a fresh MemoryCache.
  • Fetches user spielberg@azaion.com, then calls CheckHardwareHash with a specific hardware string.
  • No assertion — the test only verifies no exception is thrown.

Dependencies

  • UserService, DbFactory, MemoryCache
  • ConnectionStrings, OptionsWrapper
  • xUnit

Consumers

None — test module.

Data Models

None.

Configuration

Hardcoded connection strings to 188.245.120.247:4312 (remote database).

External Integrations

Live PostgreSQL database (remote server).

Security

Contains hardcoded database credentials in source code. This is a security concern — credentials should be in test configuration or environment variables.

Tests

This IS the test module.