بنقرة واحدة
test
Integration test patterns and infrastructure for SourceBase. Use when writing, reviewing, or fixing tests.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Integration test patterns and infrastructure for SourceBase. Use when writing, reviewing, or fixing tests.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Windows WPF tray-app architecture and conventions for SourceBase.Desktop (Jupiter). Use when writing or reviewing tray icon wiring, overlay windows, schedulers, settings persistence, or API sync code in SourceBase.Desktop.
Frontend Blazor components, Tailwind CSS layout patterns, and mobile-responsive design for SourceBase. Use when writing or reviewing Blazor components, UI layout, or responsive behavior — especially for mobile S (320px) viewports.
Backend architecture, API endpoints, handlers, entities, and conventions for SourceBase. Use when writing or reviewing API features, handlers, entities, validators, or infrastructure.
PR review checklist for SourceBase. Use when reviewing pull requests to verify architecture, conventions, tests, and code quality.
| name | test |
| description | Integration test patterns and infrastructure for SourceBase. Use when writing, reviewing, or fixing tests. |
| trigger | /test |
Integration test conventions for SourceBase using xUnit + FluentAssertions + WebApplicationFactory.
Test classes live in SourceBase.Tests/ and mirror the Features/ structure — one class per endpoint.
WebAppFactory — full app with an isolated in-memory SQLite database per test run, seeded with an admin user (AdminEmail / AdminPassword from config).CreateAuthorizedClient() — returns an HttpClient pre-authorized as the seeded admin.[Fact(DisplayName = "TODOS-CREATE-006: CreateTodo_WithValidTodoListId_ReturnsOk")]
public async Task CreateTodo_WithValidTodoListId_ReturnsOk()
{
// Arrange
var client = await factory.CreateAuthorizedClient();
var listResponse = await client.PostAsJsonAsync("todo-lists", new { name = $"List_{Guid.NewGuid():N}" });
var list = await listResponse.Content.ReadFromJsonAsync<CreateTodoListResponse>();
// Act
var response = await client.PostAsJsonAsync(CreateTodoEndpoint.Route, new
{
date = "2025-06-01",
title = "Todo in list",
status = "Open",
todoListId = list!.Id,
});
// Assert
var todoResponse = await client.GetAsync(GetTodoEndpoint.Route.WithId(body.Id));
var todo = await todoResponse.Content.ReadFromJsonAsync<GetTodoResponse>();
todo!.CreatedBy.Should().Be(userInfo!.UserName);
todo.UserId.Should().Be(userInfo.Id);
}
MethodName_WithCondition_ReturnsExpected{FEATURE}-{ACTION}-{NNN} in DisplayName (e.g. TODOS-CREATE-001)CreateTodoEndpoint.Route) — never hardcoded strings.WithDbContextAsync in tests unless asserting on a DB field not exposed by the API response.