UpdaterAgent maintains two test projects that together cover service logic in isolation and the full HTTP pipeline end-to-end. All tests follow shared naming, fixture, and assertion conventions so that any developer can read an unfamiliar test and immediately understand its intent.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ShohjahonSohibov/repo-for-agent/llms.txt
Use this file to discover all available pages before exploring further.
Test projects
UpdaterAgent.Application.ServicesTests
Unit tests for application services. Uses xUnit, Moq, and FluentAssertions. Each test class has a dedicated fixture and mocks all external dependencies.
UpdaterAgent.Integration.Tests
Integration tests that spin up the full application using
WebApplicationFactory<Program>. Tests run against a real database with test fixtures applied.Naming convention
Every test method follows theMethodName_Scenario_ExpectedResult pattern. This makes it immediately clear what is being tested, under what conditions, and what outcome is expected — without reading the test body.
Test class structure
Each test class is structured with a fixture for setup and#region blocks to separate success and failure cases.
Fixture pattern
Each test class uses a dedicated[Feature]ServiceFixture that sets up mocks and the service under test. The fixture is shared across all tests in the class via IClassFixture<T>.
Builder pattern
Request objects are constructed with fluent builders to make test setup readable and resistant to constructor changes.Assertions
Use FluentAssertions (.Should()) for all assertions. Moq is used for mocking and verifying interactions. Avoid Assert.Equal in favor of the more readable FluentAssertions syntax.
Running tests
Hangfire is disabled in the
Testing environment. Jobs that depend on Hangfire scheduling are not executed during test runs. Test job logic directly by calling the job’s ExecuteAsync method in unit tests.Grouping summary
| Convention | Rule |
|---|---|
| Success paths | #region Success Cases |
| Failure paths | #region Failure Cases |
| Setup | [Feature]ServiceFixture via IClassFixture<T> |
| Request construction | Fluent builder (e.g., UserRequestBuilder) |
| Assertions | FluentAssertions .Should() |
| Mocking | Moq |
| Test naming | MethodName_Scenario_ExpectedResult |