AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Monica Unit Testing

skill-tairitsua-monica-monica-unit-testing · by Tairitsua

Use when creating, extending, or standardizing Monica unit tests, test project scaffolding, shared test infrastructure, tests/ directory layout, xUnit or bUnit test setup, Monica-specific result assertions, module registration tests, or test-related skills and documentation.

No reviews yet
0 installs
22 views
0.0% view→install

Install

$ agentstack add skill-tairitsua-monica-monica-unit-testing

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-tairitsua-monica-monica-unit-testing)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Monica Unit Testing? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Monica Unit Testing

Create Monica unit tests under tests/ using the shared root Monica.UnitTests toolkit, Test.Monica.* runnable project naming, xUnit v3 for unit tests, and bUnit for Blazor UI tests. Follow Monica-specific rules for Res assertions, module guide testing, sociable host tests, and UI page or component boundaries instead of inventing per-project test conventions.

When To Use

  • Add a new Monica unit test project.
  • Extend or refactor tests under tests/.
  • Define Monica-wide test rules, test layout, or naming standards.
  • Add reusable test helpers to Monica.UnitTests/.
  • Test module guides, module dependencies, facades returning Res, providers, support classes, or Blazor components and pages.
  • Create or update a Monica testing skill or testing documentation.

Workflow

  1. Read /tests/README.md first. It is the current source of truth for Monica test layout, naming, stack, and WSL execution rules.
  2. Reuse Monica.UnitTests/ before adding project-local helpers. Shared result assertions, module reset helpers, localization stubs, UI theme stubs, and sociable test fixtures belong there.
  3. Keep all unit-test-related artifacts under tests/. New runnable test projects must use the Test.Monica.* prefix and mirror the source project folder structure.
  4. Prefer public-surface tests first:
  • Modules/
  • Facades/
  • public models or abstractions
  • stable support classes or in-memory providers
  1. For UI modules, stay at component level and page-shell level. Use bUnit, deterministic localizers, and fake or in-memory services. Do not introduce browser automation or real backend dependencies into these unit tests.
  2. After edits, run dotnet test with Windows paths under WSL. Keep a single build or test process at a time.

Sociable Application Tests

For Monica-based business applications, prefer the monica-application-unit-testing skill. It defines the exact Test.{ProductionProjectName} architecture, collection fixtures, database isolation choices, and migration rules for command handlers, query handlers, domain services, repositories, and module-registration tests.

Use MonicaApplicationFixture as the default when the service has a startup module. Keep ApplicationServiceFixture as a fast path for narrow, fully substituted handler tests.

Required Conventions

  • Shared test infrastructure project: Monica.UnitTests/Monica.UnitTests.csproj
  • Runnable test project naming: tests/Test.Monica.{ProjectName}/
  • Test class naming: {TypeName}Tests
  • Test method naming: Method_WhenCondition_ShouldExpectation
  • Test folders should mirror the source layout, for example:
  • Modules/
  • Facades/
  • Providers/
  • Services/
  • Pages/
  • Components/
  • UIJobScheduler/Shared/Support/

Monica-Specific Rules

  • Assert Res explicitly.
  • Facade tests must assert Status, Message, and Data.
  • For Res success paths, always verify Data; Monica has a known Res.Ok(string) overload trap.
  • Module tests should not stop at checking static tables.
  • Prefer testing required config methods, guide methods, dependency declarations, or service registrations.
  • Prefer in-memory and deterministic seams.
  • Use in-memory providers, substitutes, or fixed timestamps.
  • Avoid real network, real persistence, and Task.Delay-based waiting.
  • Use MonicaApplicationFixture for sociable application tests when the target has a module startup type.
  • Override fixture configuration to register test-friendly providers and replace external seams.
  • Keep the test assertion on public DI-visible behavior instead of private boot internals.
  • Keep InternalsVisibleTo exceptional.
  • Only add it when public-surface tests genuinely cannot cover critical behavior.
  • Scope it narrowly to the corresponding test project.

Default Stack

  • xUnit v3
  • AwesomeAssertions
  • NSubstitute
  • NSubstitute.Analyzers.CSharp
  • coverlet.collector
  • bUnit for UI test projects only

Sample Baseline

  • Shared infrastructure: Monica.UnitTests/
  • UI infrastructure sample: tests/Test.Monica.UI/
  • Infrastructure sample: tests/Test.Monica.JobScheduler/
  • UI sample: tests/Test.Monica.JobScheduler.UI/

Use these sample projects before introducing a new pattern. When the new work matches an existing sample, copy the sample structure and adapt it instead of inventing another style.

Read As Needed

  • references/standards.md
  • Stable Monica testing rules and decision points.
  • references/samples.md
  • Current sample projects, recommended target types, and starter patterns.
  • ../monica-application-unit-testing/SKILL.md
  • Sociable application testing architecture for Monica-based business services.

Validation

  • Use Windows paths for dotnet commands in WSL.
  • Run a single dotnet build or dotnet test process at a time.
  • Finish by running the relevant solution or project tests, not only by writing scaffolding.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.