‎2021 May 31 3:07 PM
Howdy, folks!
I'm beginning to work "seriously" with ABAP Units and, in a some weird way, TDD. I've read the impressive e-bite from bfeeb8ed7fa64a7d95efc21f74a8c135 called "Refactoring Legacy ABAP code" (a must read if you are into these things), and I've almost understood the basics.
But I'm not sure if I can get that e-bite as a rule or just as a guideline, when referring to the objects structure.
Maybe because I'm a lazy b...rd, I build my first legacy-killer class this way:
The main idea about this is to keep all those things as close as possible, not been accessible by foreig items. Obviously, if I detect that a dependency is used by more than a single class (been the only developer, I guess it will be easy to notice), I will create a global class ZCL_xxxx with a method for that dependency, and in the corresponding ifdependenciesremover method I will put a call to it.
The only drawback I see it's the coverage of my tests will be never the 100%, but because I know it, I just ignore the global bar and I just look at the main class one.
Now, if you have understood my explanation, I'm sure you are asking yourselves
WHAT IS WRONG WITH THIS GUY?
And that's just my question: what's wrong with my approach?