/trivia-refactoring

Legacy code is profitable code even when it's not clean. This repo is a demonstration of how to add a safety net using the Golden Master Technique and REFACTOR

Primary LanguageC#MIT LicenseMIT


Refactoring Trivia

Sonar

Lines of Code Maintainability Rating Reliability Rating Security Rating Coverage Technical Debt Duplicated Lines (%) Vulnerabilities Code Smells Bugs Quality Gate Status

Exercise based on the Trivia Legacy Code Retreat code.

Steps

Golden Master

  • Capture the program's output and check whether it's deterministic or not;
  • Repeat the execution a reasonable number of times, until the code coverage gives you enough confidence for your subsequent refactoring activities;
  • Collect the output in a file, and include it in the test project, using an error-prone manual operation (Poka-yoke).

Refactor Game's refer the commits for detaied refactoring