Reputation: 625
I am using moles framework to unit test my code.
There is an implementation of a singleton class with
This class implements an abstract class.
How do I circumvent the Initialization function of my singleton class? This Initialization function is called from the constructor of the abstract base class.
Upvotes: 2
Views: 613
Reputation: 10346
You can subclass your singleton to make a "for testing" version. You can make your initilization function abstract, and have your real singleton implement what you're currently doing, and have the testing version implement something to initialize your test version.
Upvotes: 1