bunit-test-migration

Official

Migrate legacy bUnit tests to the modern API quickly.

AuthorFritzAndFriends
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill guides developers in migrating bUnit tests from deprecated 1.0.0-beta-10 patterns to the stable bUnit 2.x API, reducing manual editing and ensuring tests run with the new rendering model.

Core Features & Use Cases

  • Inheritance migration: update @inherits TestComponentBase to @inherits BunitContext.
  • Remove wrapper elements: drop <Fixture> blocks and their wrappers.
  • Test method conversion: convert void TestName(Fixture fixture) to [Fact] public void TestName().
  • Render and verify: replace fixture.GetComponentUnderTest() patterns with Render(@<Component />) calls.
  • Snapshot tests: convert SnapshotTest blocks to [Fact] methods that use Render and MarkupMatches.

Quick Start

Review files with .razor test files using old patterns and apply the migration rules above. Then run tests to validate.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: bunit-test-migration
Download link: https://github.com/FritzAndFriends/BlazorWebFormsComponents/archive/main.zip#bunit-test-migration

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.