This repository showcases several test projects designed to demonstrate essential techniques in back-end testing. The focus is primarily on unit testing, decoupling, and using the Moq framework for mocking dependencies in C#.
- Unit Testing: Testing individual units of code in isolation to ensure they function as expected.
- Decoupling: Minimizing dependencies between system components, enabling easier testing and greater modularity.
- Mocking: Leveraging the Moq framework to create mock objects that simulate real dependencies, allowing for controlled testing scenarios.
- Moq: A powerful and flexible mocking framework for .NET that simplifies creating test doubles.
- NUnit: A widely used testing framework for writing and running tests in .NET environments.
- GetGreeting.Tests: Contains unit tests designed to validate the functionality of the GetGreeting application.
- GetGreeting: The main application project responsible for generating personalized greetings.
- ItemManagementApp: The main application logic for managing items, including adding, updating, and removing items.
- ItemManagementLib: A shared library that contains the core functionalities used by the ItemManagementApp.
- ItemManagementTests: A collection of unit tests written to validate the behavior and functionality of the ItemManagement project.
To run and modify these test projects, you’ll need:
- .NET 6.0 SDK or higher
- Visual Studio 2022 or later / Visual Studio Codee
Contributions are welcome! If you have any improvements or bug fixes, feel free to open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, please reach out to me or open an issue in the repository.