> Generates NUnit 3 tests in C#. Covers Assert.That constraint model, parameterized tests, setup/teardown, and Moq mocking. Use when user mentions "NUnit", "[Test]", "Assert.That", "C# test", "NUnit3".
npx skills add https://github.com/LambdaTest/agent-skills --skill nunit-skill
using NUnit.Framework;
[TestFixture]
public class CalculatorTests
{
private Calculator _calculator;
[SetUp]
public void SetUp() => _calculator = new Calculator();
[Test]
public void Add_TwoPositiveNumbers_ReturnsSum()
{
Assert.That(_calculator.Add(2, 3), Is.EqualTo(5));
}
[Test]
public void Divide_ByZero_ThrowsException()
{
Assert.Throws<DivideByZeroException>(() => _calculator.Divide(10, 0));
}
[TearDown]
public void TearDown() { /* cleanup */ }
}
Assert.That(actual, Is.EqualTo(expected));
Assert.That(actual, Is.Not.EqualTo(unexpected));
Assert.That(value, Is.GreaterThan(5));
Assert.That(value, Is.InRange(1, 10));
Assert.That(str, Does.Contain("hello"));
Assert.That(str, Does.StartWith("He").IgnoreCase);
Assert.That(collection, Has.Count.EqualTo(3));
Assert.That(collection, Has.Member("item"));
Assert.That(collection, Is.All.GreaterThan(0));
Assert.That(obj, Is.Null);
Assert.That(obj, Is.Not.Null);
Assert.That(obj, Is.InstanceOf<MyClass>());
Assert.That(actual, Is.EqualTo(3.14).Within(0.01));
Assert.That(() => Method(), Throws.TypeOf<ArgumentException>()
.With.Message.Contains("invalid"));
[TestCase(2, 3, 5)]
[TestCase(-1, 1, 0)]
[TestCase(0, 0, 0)]
public void Add_ReturnsCorrectSum(int a, int b, int expected)
{
Assert.That(_calculator.Add(a, b), Is.EqualTo(expected));
}
[TestCaseSource(nameof(DivisionCases))]
public void Divide_ReturnsCorrectQuotient(int a, int b, double expected)
{
Assert.That(_calculator.Divide(a, b), Is.EqualTo(expected).Within(0.01));
}
private static IEnumerable<TestCaseData> DivisionCases()
{
yield return new TestCaseData(10, 2, 5.0).SetName("10/2=5");
yield return new TestCaseData(7, 3, 2.33).SetName("7/3=2.33");
}
using Moq;
[TestFixture]
public class UserServiceTests
{
private Mock<IUserRepository> _mockRepo;
private Mock<IEmailService> _mockEmail;
private UserService _service;
[SetUp]
public void SetUp()
{
_mockRepo = new Mock<IUserRepository>();
_mockEmail = new Mock<IEmailService>();
_service = new UserService(_mockRepo.Object, _mockEmail.Object);
}
[Test]
public void CreateUser_SavesAndSendsEmail()
{
_mockRepo.Setup(r => r.Save(It.IsAny<User>())).Returns(new User { Id = 1 });
var result = _service.CreateUser("[email protected]", "Alice");
Assert.That(result.Id, Is.EqualTo(1));
_mockRepo.Verify(r => r.Save(It.IsAny<User>()), Times.Once);
_mockEmail.Verify(e => e.SendWelcome("[email protected]"), Times.Once);
}
}
[OneTimeSetUp] → Before all tests in fixture
[SetUp] → Before each test
[Test] → Test method
[TearDown] → After each test
[OneTimeTearDown] → After all tests in fixture
[Test, Category("Smoke")]
public void QuickTest() { }
[Test, Ignore("Bug #123")]
public void SkippedTest() { }
[Test, Timeout(5000)]
public void TimeLimitedTest() { }
[Test, Retry(3)]
public void FlakyTest() { }
| Bad | Good | Why |
|-----|------|-----|
| Assert.AreEqual(a, b) (classic) | Assert.That(a, Is.EqualTo(b)) | Constraint model is richer |
| No [SetUp] | Proper lifecycle | Resource management |
| Testing private methods | Test public API | Encapsulation |
| No categories | [Category("Smoke")] | Run subsets |
dotnet add package NUnit NUnit3TestAdapter Microsoft.NET.Test.Sdkdotnet test or dotnet test --filter TestCategory=SmokeFor advanced patterns, debugging guides, CI/CD integration, and best practices,
see reference/playbook.md.
Multi-agent autonomous startup system for Claude Code. Triggers on "Loki Mode". Orchestrates 100+ specialized agents across engineering, QA, DevOps, security, data/ML, business operations, marketing, HR, and customer success. Takes PRD to fully deployed, revenue-generating product with zero human intervention. Features Task tool for subagent dispatch, parallel code review with 3 specialized reviewers, severity-based issue triage, distributed task queue with dead letter handling, automatic deployment to cloud providers, A/B testing, customer feedback loops, incident response, circuit breakers, and self-healing. Handles rate limits via distributed state checkpoints and auto-resume with exponential backoff. Requires --dangerously-skip-permissions flag.
Use when working with error debugging multi agent review
Build evaluation frameworks for agent systems. Use when testing agent performance systematically, validating context engineering choices, or measuring improvements over time.
Diagnoses and debugs A2A agent communication issues including agent status, message routing, transport connectivity, and log analysis. Use when agents aren't responding, messages aren't being delivered, routing is incorrect, or when debugging orchestrator, coder-agent, tester-agent communication problems.
Use when working with error debugging multi agent review
Rapidly creates atomic, focused skills optimized with evidence-based prompting, specialist agents, and systematic testing. Each micro-skill does one thing exceptionally well using self-consistency, program-of-thought, and plan-and-solve patterns. Enhanced with agent-creator principles and functionality-audit validation. Perfect for building composable workflow components.
Ultimate multi-agent framework for Google Antigravity. Orchestrates specialized domain agents (PM, Frontend, Backend, Mobile, QA, Debug) via Serena Memory.
This skill should be used when the user asks to "evaluate agent performance", "build test framework", "measure agent quality", "create evaluation rubrics", or mentions LLM-as-judge, multi-dimensional evaluation, agent testing, or quality gates for agent pipelines.
Take lambdatest/nunit-skill from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.