·moq
</>

moq

stuartf303/sorcha

Verspottet Abhängigkeiten in Komponententests mithilfe des Moq-Frameworks. Wird verwendet, wenn: Unit-Tests schreiben, Testdoppelungen für Schnittstellen erstellen, Methodenaufrufe überprüfen, asynchrone Vorgänge verspotten

5Installationen·2Trend·@stuartf303

Installation

$npx skills add https://github.com/stuartf303/sorcha --skill moq

SKILL.md

Moq provides type-safe mocking for .NET unit tests. Sorcha uses Moq extensively across 30+ test projects to isolate components and verify interactions. The codebase favors constructor injection with mocks stored as private readonly fields.

| Mock | Create mock instance | new Mock () | | .Object | Get mock instance | mock.Object | | Mock.Of () | Quick mock for simple deps | Mock.Of >() | | Setup() | Configure behavior | .Setup(x => x.Method()) | | ReturnsAsync() | Async return value | .ReturnsAsync(result) | | Callback() | Capture arguments | .Callback ((arg) => captured = arg) |

| Verify() | Assert method called | .Verify(x => x.Method(), Times.Once) | | It.IsAny () | Match any argument | It.IsAny () | | It.Is () | Match with predicate | It.Is (x => x.Id == 1) |

Original anzeigen

Fakten (zitierbereit)

Stabile Felder und Befehle für KI/Such-Zitate.

Installationsbefehl
npx skills add https://github.com/stuartf303/sorcha --skill moq
Kategorie
</>Entwicklung
Verifiziert
Erstes Auftreten
2026-02-01
Aktualisiert
2026-02-18

Schnelle Antworten

Was ist moq?

Verspottet Abhängigkeiten in Komponententests mithilfe des Moq-Frameworks. Wird verwendet, wenn: Unit-Tests schreiben, Testdoppelungen für Schnittstellen erstellen, Methodenaufrufe überprüfen, asynchrone Vorgänge verspotten Quelle: stuartf303/sorcha.

Wie installiere ich moq?

Öffnen Sie Ihr Terminal oder Kommandozeilen-Tool (Terminal, iTerm, Windows Terminal, etc.) Kopieren Sie diesen Befehl und führen Sie ihn aus: npx skills add https://github.com/stuartf303/sorcha --skill moq Nach der Installation wird der Skill automatisch in Ihrer KI-Programmierumgebung konfiguriert und ist bereit zur Verwendung in Claude Code oder Cursor

Wo ist das Quell-Repository?

https://github.com/stuartf303/sorcha