Instructor-led training
Test-Driven Development Using NUnit and C# Training in Adrian, Michigan
An emerging software engineering paradigm is test-driven development, where tests are written early and testing is performed continuously during the development process.
What you'll learn
Private Training for Teams
This course is offered as private, instructor-led training for organizations, onsite in Adrian, Michigan or live online. Dates, delivery format, and course content are arranged around your team's requirements.
This course is not currently scheduled as a public class for individual enrollment.
Request Group TrainingPrerequisites
Course Outline
1. Test-Driven Development
What Is Test-Driven Development (TDD)?
Functional Tests / Customer Tests
Unit Tests / Programmer Tests
Test Automation
Simple Design
Refactoring
An NUnit Test Drive
TDD with Legacy Code
2. NUnit Fundamentals
Structure of Unit Tests
NUnit Framework
Assertions
Test Cases
Test Fixtures
Test Runners
Ignoring Tests
Setup and TearDown
Test Fixture Setup and TearDown
NUnit GUI Tool
NUnit with Visual Studio
3. More about NUnit
Exceptions
Debugging NUnit Tests
Custom Asserts
Categories
NUnit Console Tool
Refactoring
What makes test-driven development hard to learn
The NUnit API is small. The difficulty is the working discipline: write the test first, make it pass with the simplest code, then clean up. Several habits tend to get in the way.
- Two kinds of tests. The syllabus separates functional (customer) tests from unit (programmer) tests. Teams often blur them, and the result is slow, brittle tests that check the wrong thing.
- Refactoring depends on tests. Simple Design and Refactoring appear in the first module and again in the last. Restructuring code is safe only when automated tests cover it, so the practices reinforce each other.
- Test structure. Fixtures, test cases, Setup/TearDown and fixture-level setup and teardown decide whether tests stay independent or start depending on run order. Ignoring tests is covered too, and it is easy to abuse.
- Legacy code. The course includes TDD with legacy code. Existing code that was not written for testing is where most teams struggle, and it is worth seeing before you try it on a production system.
The material builds in three steps. Module 1 covers the method and an NUnit test drive. Module 2 covers the framework: assertions, fixtures, runners, the NUnit GUI tool and Visual Studio integration. Module 3 adds exception testing, debugging tests, custom asserts, categories and the console tool. A cumulative case study ties these together.
Who it suits and what to take around it
This one-day, general-level course is for C# developers who already work in Visual Studio and have basic .NET Framework knowledge. It assumes you can write C# but not that you have written automated tests. Testers and team leads who read C# code can also follow it.
If your C# or .NET background is thin, .NET Framework Using C# builds the language and library knowledge this course assumes. Once you can write tests, .NET Design Patterns and Principles is a natural next step. It extends the Simple Design and Refactoring topics here into structuring code that stays easy to test.
The course materials reference Visual Studio 2015, which Microsoft no longer supports (support ended October 2025). The course therefore suits teams that maintain or migrate existing .NET code. Organizations on newer Visual Studio or .NET releases can ask about private training tailored to the versions they use through a training proposal request.
Illustrative scenarios
The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.
- Taking over untested code. A team might inherit a pricing module with no tests and a backlog of change requests. The legacy-code topic and refactoring show how to pin down current behavior with tests before changing anything.
- Fast feedback in a build. A team might want quick checks on every commit and slower checks nightly. NUnit categories and the console tool let them select which tests run from a script.
- Specifying failure behavior. A developer writing input validation might need to prove that bad input raises the right exception. The exception-testing topic covers this, and custom asserts can wrap repeated checks into readable, reusable ones.
AI coding assistants and test-driven development
AI coding assistants can draft test methods, fixtures and sample inputs quickly, which helps with repetitive test cases. They fail in ways that matter for these topics:
- Tests written after the code. An assistant asked to "add tests" for existing code usually encodes what the code does, bugs included. That reverses the test-first idea the course teaches.
- Weak assertions. Generated tests may assert almost nothing or mirror the implementation. They pass, but they would not catch a regression.
- Version mismatch. NUnit has more than one assertion style and attribute set. Generated code may mix styles or use APIs that do not exist in your NUnit or .NET version.
- Shared state. Setup and TearDown code written by an assistant can leak state between tests and make them order-dependent.
To verify, run each generated test against deliberately broken code and confirm it fails. Check that every assertion tests a specific outcome. Compile against your actual NUnit version, and run tests singly and as a whole fixture to expose hidden dependencies.
Frequently asked questions
What level is this course?
It is a general-level, one-day course for developers. It introduces test-driven development and NUnit, and it does not assume prior experience writing automated tests.
What should I know before attending?
A basic knowledge of the .NET Framework and experience programming in C# with Visual Studio.
What does the course cover?
It covers TDD concepts (functional and unit tests, test automation, simple design, refactoring, TDD with legacy code) and NUnit fundamentals: assertions, test cases, fixtures, runners, ignoring tests, Setup/TearDown, the NUnit GUI tool and Visual Studio integration. It also covers exceptions, debugging tests, custom asserts, categories and the console tool. A cumulative case study is included.
Can this be delivered privately for our team, onsite or online?
Yes. HSG provides private training for organizations, delivered onsite at your location or live online.
Can the content be customized to our tools and versions?
Private training can be tailored to the technology versions your organization uses, including newer releases, and the content can be customized. You can describe your needs through a training proposal request.
Training locations
Test-Driven Development Using NUnit and C# training across the U.S. and beyond.
We provide private Test-Driven Development Using NUnit and C# training for organizations, onsite at your location or live online, throughout the United States and internationally.
View all Test-Driven Development Using NUnit and C# training locations
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- For a single employee or an entire team
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.