An open API service indexing awesome lists of open source software.

https://github.com/aboubakr-jelloulat/unit-testing-in-csharp

This repository is dedicated to learning unit testing in C# using modern testing frameworks and best practices. It covers essential concepts and techniques for writing effective, maintainable tests in .NET applications.
https://github.com/aboubakr-jelloulat/unit-testing-in-csharp

csharp testing testing-framework testing-tools xunit

Last synced: 9 months ago
JSON representation

This repository is dedicated to learning unit testing in C# using modern testing frameworks and best practices. It covers essential concepts and techniques for writing effective, maintainable tests in .NET applications.

Awesome Lists containing this project

README

          

# C# Unit Testing Learning Repository


.NET Core
C#
xUnit

## Overview

This repository is dedicated to learning unit testing in C# using modern testing frameworks and best practices. It covers essential concepts and techniques for writing effective, maintainable tests in .NET applications.

## Learning Topics

### Testing Code with Frameworks
Learn to set up and configure popular testing frameworks including xUnit, NUnit, and MSTest. Understand the differences between frameworks and how to choose the right one for your project.

### Unit Test Your Code
Master the fundamentals of writing effective unit tests with proper assertions and test structure. Learn how to organize your tests, write clear test names, and implement the Arrange-Act-Assert pattern.

### 🎭Mocking Dependencies
Discover how to isolate units under test using mocking frameworks. Learn to create test doubles, stubs, and mocks to ensure your tests are fast, reliable, and focused on the code under test.

### Fact, Theory & Code Coverage
Explore data-driven testing with Facts and Theories, and learn how to measure and improve your code coverage. Understand the importance of meaningful test coverage versus just hitting percentage targets.

## Getting Started

1. Clone this repository
2. Ensure you have .NET Core SDK installed
3. Navigate to each topic folder to explore examples and exercises
4. Run tests using `dotnet test` command

## Prerequisites

- .NET Core SDK 6.0 or later
- Basic knowledge of C# programming
- Visual Studio IDE

## Contributing

Feel free to contribute by adding examples, fixing bugs, or improving documentation. Please follow the established patterns and ensure all tests pass before submitting a pull request.

*Happy Testing! *