writing-unit-tests-csharp
Skill: Writing C# Unit Tests
Overview
This skill covers writing unit tests for the backend using MSTest SDK. The project uses a lean, zero-config approach that leverages Microsoft's official SDK-style testing.
Project Structure
backend/
├── WebApp.sln
├── WebApp.Api/
│ ├── Models/ # DTOs and request/response models
│ ├── Services/ # Business logic and agent integration
│ └── Program.cs # Minimal API endpoints
└── WebApp.Api.Tests/
├── WebApp.Api.Tests.csproj
└── [TestClass].cs # Test files organized by class under test
More from microsoft-foundry/foundry-agent-webapp
writing-bicep-templates
Provides Bicep coding standards for Azure infrastructure in this repository. Use when writing or modifying Bicep files, configuring Container Apps, setting up RBAC, or working with Azure resources.
39writing-typescript-code
Provides TypeScript and React coding standards for this repository. Use when writing or modifying TypeScript code, creating React components, implementing MSAL authentication, or working with the frontend.
12deploying-to-azure
Provides deployment commands and troubleshooting for Azure Container Apps. Use when running azd commands, deploying containers, debugging deployment failures, or updating infrastructure in this repository.
11writing-csharp-code
Provides C# and ASP.NET Core coding standards for this repository. Use when writing or modifying C# code, implementing API endpoints, configuring middleware, or working with authentication in the backend.
11validating-ui-features
Provides step-by-step procedures for validating UI features - theme toggle, new chat, cancel stream, markdown rendering, and token usage info.
10troubleshooting-authentication
Provides authentication troubleshooting for MSAL, JWT, and Entra ID. Use when debugging 401 errors, token issues, MSAL configuration problems, or credential failures in this repository.
10