I have a bit of a challenge and I am not sure how to approach this. We have a very very large project (that is about 5 years old). The code base is HUGE so a full refactor is out of the question.
What we will be doing is refactoring bits of code as we use those parts (this is backend code, which we will be using on a frontend system)
The existing code has got zero abstraction, and we want to build unit tests for it. We use the RhinoMock framework and the call from my superiors are that we need to add explicit interfaces to the code, thereby abstracting it so that we can mock the objects in RhinoMock.
I have one broader and one narrower question: 1) Is an explicit interface the best option? Or should I suggest some other technique...
2) Can anyone suggest a high-level approach to this type of code refactoring? I've never been in a position where I have had to add explicit interfaces to existing code. (The legacy code is Managed C++ by the way)
Thanks in advance for your answers. Also, if this question is in the wrong place or too broad, I do apologize.