I was fixing a bug in our system. Here are the facts:
- The bug sits in a method Yum() in a sealed class Noodles.
- Bug method Yum() is a static method.
- Yum() method is used 200+ times across code base.
- Sealed class Noodles does implement a interface.
My question is that what is the best way of replacing the static method call with non-static calls without risking that it might break other code.
I want also be able to test Noodles class. As it is a sealed class and method is static, mocking option is out of window.
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire