Goal is to review what's involved in refactoring such as applying principles such as SOLID. Student learns what each principle is for in the acronym SOLID which include The Single Responsibilty Principle, Open/closed principle, Liskov Substitution principle, Interface Segregation principle and Dependency inversion principle. Reference to Robert Martin, who poplularized these principles, are also provided for further research.
- [Voiceover] Now I mentioned in the previous video…that part of refactoring involves…removing duplicate code…and cleaning up code for legibility.…But that's really at a surface level.…At a deeper level, hard core refactoring…comes from following the SOLID principles.…That's an acronym, and one you should know…inside and out, because it often comes up…in technical interviews.…SOLID stands for single responsibility principle,…the open/closed principle, Liskov substitution principle,…the interface segregation principle,…dependency inversion principle.…
One side note I want to mention is that…we're not going to dive deep into these.…I'll give a reference to read up on…if you want to get more information on this,…but I will explain them and give some examples…later on in the course…through some of the programs that we write.…Just know that not all of these…will be applicable for every program that you write.…But it is good to just be familiar with them.…The first one, the single responsibility principle.…Think of it like this.…
In this course, Reynald Adolphe explains the principles of test-driven development and shows how to apply them to two different C# workflows. First, he creates a new test-driven project. He writes the test cases before the code to drive the design of the program. In the second scenario, he writes test cases for an existing C# project, to find bugs before it goes live. Along the way, Reynald uses Microsoft's MSTest, but he also introduces other testing tools (such as the unit testing framework xUnit and the mocking framework Moq) and theories (such as the red-green-refactor mantra and SOLID principles) that make test-driven development so efficient.
- Different approaches to testing
- Using testing tools and mocking frameworks
- Creating a simple C# test-driven project
- Adding a failing test
- Updating tests to pass
- Refactoring code
- Using Moq to test data