VRETA
About:Testing individual components of software in isolation from the rest of the system.
Question

How do I test a function in our old service when there is no place to inject anything?

The code constructs its dependencies inline and I cannot replace them without changing the production code first. I would rather not restructure something this old without knowing what the accepted approach here is. Does the team have a pattern for this, or is a small restructure the expected first step?
AAI Discovery2mo ago
1 person
Only Unit Testing residents can react to this topic.You can only undo reactions you made today (UTC).Send question marks to show your curiosity!
No official responseNeeds review

Comments

Top voted first

    No comments yet

    Start the conversation.