You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
TeaPie is a lightweight CLI-based API testing framework for >=.NET 8. It executes tests defined as `.http` files with optional C# scripts (`.csx`) for pre-request setup and post-response validation. Installed as a dotnet global tool (`TeaPie.Tool`).
8
+
9
+
## Build & Test Commands
10
+
11
+
```sh
12
+
dotnet restore # Restore dependencies
13
+
dotnet build # Build all projects
14
+
dotnet build -warnaserror # Build as CI does (warnings are errors)
15
+
dotnet test# Run all tests
16
+
dotnet test --filter "FullyQualifiedName~ClassName.MethodName"# Run a single test
17
+
```
18
+
19
+
Tests use **xUnit** with **FluentAssertions** and **NSubstitute** for mocking. Test project: `tests/TeaPie.Tests/`.
20
+
21
+
CI builds with `dotnet build --configuration Release --no-restore -warnaserror` — all warnings must be resolved before merging.
-**`src/TeaPie.DotnetTool/`** — CLI entry point (NuGet tool `TeaPie.Tool`). Thin wrapper with Spectre.Console CLI commands (`test`, `explore`, `generate`, `init`, `compile-script`, `clear-cache`).
27
+
-**`tests/TeaPie.Tests/`** — Unit tests with demo fixtures in `Demo/` subdirectories.
28
+
29
+
## Architecture
30
+
31
+
### Pipeline Pattern
32
+
33
+
The core execution model is a **pipeline of steps** (`IPipelineStep`). `ApplicationBuilder` configures DI services and assembles the pipeline via `ApplicationStepsFactory`, which creates different step sequences for different modes (test execution, structure exploration, script compilation).
34
+
35
+
Steps execute sequentially against an `ApplicationContext`. The pipeline supports dynamic step insertion during execution.
-**`StructureExploration/`** — Discovers and organizes test collections from the file system. Maps `.http` files and their associated scripts into a `CollectionStructure` tree.
Each subsystem has its own `Setup.cs` file with extension methods for `IServiceCollection`. The root `Setup.cs` in `src/TeaPie/` orchestrates all registrations via `AddTeaPie()`.
61
+
62
+
## Code Style
63
+
64
+
- .NET 8, C# with nullable enabled, implicit usings
65
+
- Central package version management (`ManagePackageVersionsCentrally`)
66
+
- Roslynator analyzers enforced; `EnforceCodeStyleInBuild` is on
67
+
-`.editorconfig`: 4-space indent, CRLF line endings for C# files, UTF-8 with BOM
68
+
- Uses file-scoped namespaces, expression-bodied members, and pattern matching throughout
69
+
70
+
## Branch Naming
71
+
72
+
Use `feature/`, `bugfix/`, `refactoring/`, or `docs/` prefixes. Main branch is `master`.
73
+
74
+
## Documentation
75
+
76
+
DocFX-based docs live in `docs/`. Build with `docfx "./docs/docfx.json"`, serve with `docfx serve _site`.
0 commit comments