원클릭으로
integration-testing
Guidelines for cross-layer testing (Hooks + UI + Services) using real logic and MSW for network interception.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guidelines for cross-layer testing (Hooks + UI + Services) using real logic and MSW for network interception.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Mandatory rule requiring a corresponding test file for every business logic file and UI component.
Guidelines for naming test folders and namespaces following the Unit.[Component] convention.
Catalog of all specialized skills used across the FinanzApp project (Frontend & Backend).
Guidelines for clean code, readability, and the "No Comments" policy.
Mandatory rule for EF Core migrations and database updates.
Mandatory rules for automatically updating README.md when creating files or tests.
| name | integration-testing |
| description | Guidelines for cross-layer testing (Hooks + UI + Services) using real logic and MSW for network interception. |
This skill defines how to implement and organize integration tests that validate the interaction between Endpoints, Services, and the Database.
Unlike unit tests that mock dependencies, integration tests in FinanzApp Backend use:
WebAPI/Endpoints/ are executed via HttpClient.Services/ is executed fully.Moq or a mock server (like WireMock.Net) to intercept external calls (CoinGecko, Yahoo Finance).All integration tests MUST be located in the global tests directory:
Tests/Integration/[Module]/[Feature]IntegrationTests.csMoq while keeping core internal logic untouched.AuthenticationHandler or a test JWT generator to simulate authenticated requests.// Tests/Integration/Auth/LoginFlowTests.cs
[Fact]
public async Task Login_ValidCredentials_ReturnsTokenAndUser()
{
// 1. Arrange: Prepare client and mock dependencies if needed
var client = _factory.CreateClient();
var loginDto = new LoginDto { Email = "test@example.com", Password = "Password123" };
// 2. Act: Call the real API endpoint
var response = await client.PostAsJsonAsync("/api/auth/login", loginDto);
// 3. Assert: Verify status code and content
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<LoginResultDto>();
Assert.NotNull(result.Token);
Assert.Equal("Agus", result.User.Name);
}