Built Word Documents (.docx):
Spensara Overview (.docx)
Capability Assessment (.docx)
Brink POS Ingestion Analysis (.docx)
The Borg Ingestion Architecture (.docx)
Categories
Agent Tooling (71)
Automation workflows, orchestration references, and developer tooling guides.
- .agents/skills/agent-browser/references/authentication.md
- .agents/skills/agent-browser/references/commands.md
- .agents/skills/agent-browser/references/profiling.md
- .agents/skills/agent-browser/references/proxy-support.md
- .agents/skills/agent-browser/references/session-management.md
- .agents/skills/agent-browser/references/snapshot-refs.md
- .agents/skills/agent-browser/references/video-recording.md
- .agents/skills/agent-browser/SKILL.md
- .agents/skills/aspire-deployment/references/aws.md
- .agents/skills/aspire-deployment/references/azure.md
- .agents/skills/aspire-deployment/references/cicd.md
- .agents/skills/aspire-deployment/references/docker-compose.md
- .agents/skills/aspire-deployment/references/javascript.md
- .agents/skills/aspire-deployment/references/kubernetes.md
- .agents/skills/aspire-deployment/references/preflight.md
- .agents/skills/aspire-deployment/SKILL.md
- .agents/skills/aspire-monitoring/references/diagnostics-bridge.md
- .agents/skills/aspire-monitoring/references/monitoring.md
- .agents/skills/aspire-monitoring/references/playwright-handoff.md
- .agents/skills/aspire-monitoring/SKILL.md
- .agents/skills/aspire-orchestration/references/agent-workflows.md
- .agents/skills/aspire-orchestration/references/app-commands.md
- .agents/skills/aspire-orchestration/references/detection.md
- .agents/skills/aspire-orchestration/references/resource-management.md
- .agents/skills/aspire-orchestration/references/safety-guardrails.md
- .agents/skills/aspire-orchestration/SKILL.md
- .agents/skills/aspire/references/aspire-13-3-breaking-changes.md
- .agents/skills/aspire/SKILL.md
- .agents/skills/aspireify/references/apphost-wiring.md
- .agents/skills/aspireify/references/csharp-authoring.md
- .agents/skills/aspireify/references/docker-compose.md
- .agents/skills/aspireify/references/full-solution-apphosts.md
- .agents/skills/aspireify/references/javascript-apps.md
- .agents/skills/aspireify/references/opentelemetry.md
- .agents/skills/aspireify/references/scan-and-propose.md
- .agents/skills/aspireify/references/service-defaults.md
- .agents/skills/aspireify/references/typescript-authoring.md
- .agents/skills/aspireify/references/validation.md
- .agents/skills/aspireify/SKILL.md
- .agents/skills/caveman-compress/README.md
- .agents/skills/caveman-compress/SECURITY.md
- .agents/skills/caveman-compress/SKILL.md
- .agents/skills/caveman-help/README.md
- .agents/skills/caveman-help/SKILL.md
- .agents/skills/caveman-stats/README.md
- .agents/skills/caveman-stats/SKILL.md
- .agents/skills/caveman/README.md
- .agents/skills/caveman/SKILL.md
- .agents/skills/csharp-developer/SKILL.md
- .agents/skills/dotnet-inspect/SKILL.md
- .agents/skills/efcore-data-layer/SKILL.md
- .agents/skills/git/SKILL.md
- .agents/skills/microsoft-code-reference/SKILL.md
- .agents/skills/microsoft-docs/SKILL.md
- .agents/skills/microsoft-skill-creator/references/skill-templates.md
- .agents/skills/microsoft-skill-creator/SKILL.md
- .agents/skills/skill-creator/references/output-patterns.md
- .agents/skills/skill-creator/references/workflows.md
- .agents/skills/skill-creator/SKILL.md
- .agents/skills/tunit-testing/references/aspire-integration.md
- .agents/skills/tunit-testing/references/aspnetcore-integration.md
- .agents/skills/tunit-testing/references/assertions.md
- .agents/skills/tunit-testing/references/data-driven.md
- .agents/skills/tunit-testing/references/infrastructure-and-troubleshooting.md
- .agents/skills/tunit-testing/references/lifecycle-hooks.md
- .agents/skills/tunit-testing/SKILL.md
- AGENTS.md
- backend/AGENTS.md
- backend/tests/AGENTS.md
- Front/AGENT.md
- opencode.jsonc
Assertions Reference
Complete reference for TUnit assertions.
Table of Contents
- Core Principles
- Equality & Comparison
- Null & Default
- Boolean
- Numeric
- String
- Collections
- HTTP Responses
- Exceptions
- Type Assertions
- Chaining & Composition
Core Principles
All assertions:
- Use
Assert.That(value)syntax - Must be
awaited to execute - Return fluent builder objects for chaining
- Provide clear error messages on failure
csharp
// Always await assertions
await Assert.That(actual).IsEqualTo(expected);
// Chaining
await Assert.That(value)
.IsNotNull()
.And.IsGreaterThan(0);Equality & Comparison
Equality
csharp
await Assert.That(actual).IsEqualTo(expected);
await Assert.That(actual).IsNotEqualTo(other);
await Assert.That(actual).IsSameReference(expected);
await Assert.That(actual).IsNotSameReference(other);Comparison
csharp
await Assert.That(value).IsGreaterThan(10);
await Assert.That(value).IsGreaterThanOrEqualTo(10);
await Assert.That(value).IsLessThan(100);
await Assert.That(value).IsLessThanOrEqualTo(100);
await Assert.That(value).IsBetween(10, 100); // InclusiveWith Tolerance
For floating-point comparisons:
csharp
await Assert.That(3.14159).IsEqualTo(Math.PI).Within(0.001);
await Assert.That(actual).IsCloseTo(expected, tolerance: 0.01);Null & Default
csharp
await Assert.That(value).IsNull();
await Assert.That(value).IsNotNull();
await Assert.That(value).IsDefault(); // default(T)
await Assert.That(value).IsNotDefault();Boolean
csharp
await Assert.That(condition).IsTrue();
await Assert.That(condition).IsFalse();Numeric
All comparison assertions work with numeric types:
csharp
await Assert.That(42).IsPositive();
await Assert.That(-10).IsNegative();
await Assert.That(0).IsZero();
await Assert.That(5).IsOdd();
await Assert.That(4).IsEven();String
Content
csharp
await Assert.That(str).IsEmpty();
await Assert.That(str).IsNotEmpty();
await Assert.That(str).Contains("substring");
await Assert.That(str).DoesNotContain("substring");
await Assert.That(str).StartsWith("prefix");
await Assert.That(str).EndsWith("suffix");Pattern Matching
csharp
await Assert.That(email).Matches(@"^[\w\.-]+@[\w\.-]+\.\w+$");
await Assert.That(text).DoesNotMatch(@"\d+"); // No digitsLength
csharp
await Assert.That(str).Length().IsEqualTo(10);
await Assert.That(str).Length().IsGreaterThan(5);Case Sensitivity
csharp
// Case-insensitive comparison
await Assert.That("Hello").IsEqualTo("hello", StringComparison.OrdinalIgnoreCase);Collections
Basic Checks
csharp
await Assert.That(collection).IsEmpty();
await Assert.That(collection).IsNotEmpty();
await Assert.That(collection).Count().IsEqualTo(5);
await Assert.That(collection).Count().IsGreaterThan(0);Membership
csharp
await Assert.That(collection).Contains(item);
await Assert.That(collection).DoesNotContain(item);
await Assert.That(collection).ContainsAll(item1, item2, item3);
await Assert.That(collection).ContainsAny(item1, item2);Predicates
csharp
await Assert.That(numbers).All(n => n > 0);
await Assert.That(numbers).Any(n => n == 42);
await Assert.That(numbers).None(n => n < 0);Single Item
csharp
// Returns the single item if count == 1
var item = await Assert.That(collection).HasSingleItem();
await Assert.That(item.Name).IsEqualTo("Expected");Contains with Predicate
csharp
// Returns the found item
var admin = await Assert.That(users).Contains(u => u.Role == "Admin");
await Assert.That(admin.Permissions).IsNotEmpty();Ordering
csharp
await Assert.That(numbers).IsInOrder();
await Assert.That(numbers).IsInDescendingOrder();Equivalence
csharp
// Same items, any order
await Assert.That(actual).IsEquivalentTo(expected);
// Exact order required
await Assert.That(actual).IsEqualTo(expected);Arrays And Buffers
For byte[] and similar payload buffers, prefer IsEquivalentTo(...) when you mean element-by-element equality of contents.
csharp
await Assert.That(actualBytes).IsEquivalentTo(expectedBytes);If a failure says the contents are the same but the reference is different, you likely want equivalence rather than direct equality.
HTTP Responses
TUnit provides built-in HTTP response assertions:
Specific Status Codes
csharp
await Assert.That(response).IsOk(); // 200
await Assert.That(response).IsCreated(); // 201
await Assert.That(response).IsNoContent(); // 204
await Assert.That(response).IsBadRequest(); // 400
await Assert.That(response).IsUnauthorized(); // 401
await Assert.That(response).IsForbidden(); // 403
await Assert.That(response).IsNotFound(); // 404
await Assert.That(response).IsConflict(); // 409Parameterized
csharp
await Assert.That(response).HasStatusCode(HttpStatusCode.Created);
await Assert.That(response).HasStatusCode(HttpStatusCode.Accepted);Range Checks
csharp
await Assert.That(response).IsSuccessStatusCode(); // 200-299
await Assert.That(response).IsRedirectStatusCode(); // 300-399
await Assert.That(response).IsClientErrorStatusCode(); // 400-499
await Assert.That(response).IsServerErrorStatusCode(); // 500-599Content & Headers
csharp
await Assert.That(response).HasJsonContent();
await Assert.That(response).HasContentType("application/json");
await Assert.That(response).HasHeader("X-Request-Id");
await Assert.That(response).HasHeader("Content-Type", "application/json");Complete Example
csharp
var response = await client.PostAsJsonAsync("/alerts", request);
await Assert.That(response).IsCreated();
await Assert.That(response).HasJsonContent();
await Assert.That(response).HasHeader("Location");
var alert = await response.Content.ReadFromJsonAsync<AlertResponse>();
await Assert.That(alert).IsNotNull();
await Assert.That(alert.Name).IsEqualTo(request.Name);Exceptions
Basic Exception Testing
csharp
await Assert.That(() => DivideByZero())
.Throws<DivideByZeroException>();
await Assert.That(async () => await service.ProcessAsync())
.Throws<InvalidOperationException>();With Message Validation
csharp
await Assert.That(() => ThrowException())
.Throws<ArgumentException>()
.WithMessage("Parameter name: value");
await Assert.That(() => ThrowException())
.Throws<ArgumentException>()
.WithMessageContaining("value");No Exception
csharp
await Assert.That(() => SafeOperation()).ThrowsNothing();
await Assert.That(async () => await SafeAsync()).ThrowsNothing();Type Assertions
csharp
await Assert.That(obj).IsTypeOf<MyClass>();
await Assert.That(obj).IsNotTypeOf<OtherClass>();
await Assert.That(typeof(Dog)).IsAssignableTo<Animal>();
await Assert.That(typeof(Dog)).IsAssignableFrom<Animal>();Chaining & Composition
And Conditions
Chain assertions on the same value:
csharp
await Assert.That(username)
.IsNotNull()
.And.IsNotEmpty()
.And.Length().IsGreaterThan(3)
.And.Length().IsLessThan(20);Or Conditions
Any condition can be true:
csharp
await Assert.That(statusCode)
.IsEqualTo(200)
.Or.IsEqualTo(201)
.Or.IsEqualTo(204);Member Assertions
Assert on object properties:
csharp
await Assert.That(person)
.Member(p => p.Name, name => name.IsEqualTo("Alice"))
.And.Member(p => p.Age, age => age.IsGreaterThan(18));
// Nested properties
await Assert.That(order)
.Member(o => o.Customer.Address.City, city => city.IsEqualTo("Seattle"));Assert.Multiple
Group related assertions to see all failures:
csharp
using (Assert.Multiple())
{
await Assert.That(user.FirstName).IsEqualTo("John");
await Assert.That(user.LastName).IsEqualTo("Doe");
await Assert.That(user.Age).IsGreaterThan(18);
await Assert.That(user.Email).IsNotNull();
}
// All failures reported togetherCustom Expectations
csharp
// Simple predicate
await Assert.That(value).Satisfies(v => v % 2 == 0, "Value must be even");
// Map and assert
await Assert.That(order)
.Satisfies(o => o.Total, total => total > 100);Common Patterns
Testing Validation Results
csharp
var result = validator.Validate(input);
using (Assert.Multiple())
{
await Assert.That(result.IsValid).IsFalse();
await Assert.That(result.Errors).Count().IsEqualTo(2);
await Assert.That(result.Errors).Any(e => e.PropertyName == "Email");
}Testing API Responses
csharp
var response = await client.GetAsync("/users/123");
await Assert.That(response).IsOk();
await Assert.That(response).HasJsonContent();
var user = await response.Content.ReadFromJsonAsync<User>();
using (Assert.Multiple())
{
await Assert.That(user).IsNotNull();
await Assert.That(user.Id).IsEqualTo(123);
await Assert.That(user.Name).IsNotEmpty();
await Assert.That(user.Email).Matches(@"^[\w\.-]+@[\w\.-]+\.\w+$");
}Testing Collections with Conditions
csharp
var activeUsers = await repository.GetActiveUsersAsync();
await Assert.That(activeUsers).IsNotEmpty();
await Assert.That(activeUsers).All(u => u.IsActive);
await Assert.That(activeUsers).Any(u => u.Role == "Admin");
var admin = await Assert.That(activeUsers).Contains(u => u.Role == "Admin");
await Assert.That(admin.Permissions).ContainsAll("Read", "Write", "Delete");Best Practices
- Use specific assertions -
IsOk()instead ofHasStatusCode(HttpStatusCode.OK) - Chain related assertions - Use
.Andfor multiple checks on same value - Group with Assert.Multiple - See all failures at once
- Return values from assertions - Use
HasSingleItem(),Contains(predicate)to continue asserting - Always await - Assertions must be awaited to execute
- One logical assertion per test - Multiple technical assertions OK if testing same behavior