Interested in a private company training? Request it here.
Not ready to book yet? Request an offer here.
Every developer aspires to write code that is not only clean but also functional. However, achieving code that is easily maintainable and consistently operational poses a significant challenge. We will explore the role of unit testing in verifying the correctness of our code and ensuring its continued functionality..
When it comes to Unit Testing, you will need to choose frameworks. There are several options available, so which one do you need? Visual Studio comes with a built-in framework called MSTest, but you also have others, such as the popular xUnit.
When writing code, it's crucial to minimize unnecessary dependencies on other objects. Dependencies can increase maintenance overhead, reduce testability, and limit flexibility. Dependency injection allows you to dynamically determine which implementations to inject into dependencies at runtime, providing greater flexibility and decoupling within your codebase.
If you aim to make your code testable, you must design it with testing in mind. In this course, you'll discover the concepts of stubs and mocks, and you'll master techniques for substituting dependencies that could disrupt your testing process.
Building stubs and mocks can be laborious without an Isolation Framework. NSubstitute is one such framework that simplifies the creation of fake and stub objects required for robust testing.
Integration testing verifies that multiple parts of an application work together correctly—especially where your code interacts with external systems or infrastructure. Unlike unit tests (which isolate a single class), integration tests validate real collaboration between components.
End-to-end (E2E) testing verifies that a system works from the user`s point of view, by exercising the entire application stack from the UI through the backend to the database and back. It answers one key question: Can a real user complete a real scenario successfully?
.NET architecture testing is the practice of automatically verifying that your .NET application`s architectural rules and design decisions are respected—not just that the code works, but that it is structured correctly over time.
So your software works! Great! But how do you know if it will work next week, or next month? Did you break something while adding a new cool feature? Test everything again? Of course, but now we will automate it, making a machine do it automatically every time a team member makes a change.
Writing solid, maintainable code that works is the goal of every developer. This course guides you into the art of unit testing, where you learn to build testable code and various techniques to ensure its quality. By the end of this course, you will gain a solid and practical understanding of unit testing and its real-life applications. U2U is renowned for its hands-on approach to training, and each chapter is accompanied by a practical lab.
This course is intended for experienced programmers who are very familiar with C# and have a working experience with .NET 6/8. All examples and labs utilize the latest LTS version of .NET and Visual Studio.