SRP – Project Sample Overview
- please open the file: Overview_Start.html once the project has been cloned. To open from Visual Studio:
-
Right click on the file Overview_Start.html from Solution Explorer
-
Select the "Open With" option
-
Search for a browser application in the dialog box like "Google Chrome" and click the OK button
-
The file will now open in the browser
This sample represents a new project that is NOT currently adhering to Single Responsiblity PrinciplePoints of Focus for this exercise:
• SOLID means SUPPLE CODE • Classes that adhere to Single Reponsibility Principle have a SINGLE RESPONSIBILITY - more specifically: A SINGLE REASON TO CHANGE • Since all of the 5 SOLID principles interact synergistically, this exercise will NOT be representative of a real-world code refactor
- To begin the exercise, determine how many reasons the SRPFileStore_Start class has to change.
- Once this is done, refactor the code in the namespace: ‘Finish’ using the information below as a guide. Start with the information under the sub heading Points of Consideration. Also: a “before” and “after” UML Class diagram is included to assist with the exercise. (SRP_Start_Finish.jpg in the “Finish” folder)
- In the Test folder, create a test class and tests that exercise the refactored code named: SRPFileStore_Finish_Tests.cs or something similar.