FPCUnit Testing Patterns

Automate standardized FPCUnit testing for FreePascal/Lazarus projects.

17|7|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/delphicleancode/lazarus-spec-kit --skill fpcunit-testing-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: FPCUnit Testing Patterns
Source: https://github.com/delphicleancode/lazarus-spec-kit/tree/main/.gemini/skills/test-fpcunit
Command: npx skills add https://github.com/delphicleancode/lazarus-spec-kit --skill fpcunit-testing-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes and automates unit testing for FreePascal/Lazarus using FPCUnit, reducing boilerplate, preventing regressions, and enabling clean test fixtures, mocks, and integration tests.

Core Features & Use Cases

  • Standardized test fixtures and setup for domain, application, and infrastructure layers.
  • Mocking and fakes to isolate units under test.
  • Integration testing patterns with in-memory databases or simulated external services.

Quick Start

Create and run a FPCUnit-based test project following this skill's patterns to validate behavior.

Frequently Asked Questions about FPCUnit Testing Patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up FPCUnit test fixtures for FreePascal projects?

Mocking in FPCUnit isolates units under test by using fakes and mocks to simulate external dependencies. This skill provides standardized mocking patterns for FreePascal, allowing you to test domain logic independently of infrastructure and external services.

Can I use FPCUnit for integration testing with simulated external services?

Yes, FPCUnit supports integration testing patterns using in-memory databases or simulated external services. This skill automates these integration tests across domain layers in Lazarus, validating behavior without relying on live infrastructure.

Does FPCUnit work with Lazarus for test-driven development?

Yes, FPCUnit works seamlessly in Lazarus without requiring external dependencies. This skill operates with zero dependencies, providing standardized testing patterns directly within your FreePascal environment to prevent regressions and reduce boilerplate.

What's the best way to structure FPCUnit tests across domain layers?

The best way to structure FPCUnit tests is by applying standardized fixtures and setup patterns across domain, application, and infrastructure layers. This skill automates that structuring, ensuring clear test naming conventions and isolating domain logic through mocking.