Hey everyone.
I'm trying to solve one problem. I have a class which I want to test and it has constructor like this:
init();
}
I want that init() method is never called during testing. So is there a way to mock a constructor?
For now I use a workaround with passing parameter from test so it looks like this:
public function SomeClass(isInitWanted:Boolean = true){
if(isInitWanted){
init();
}
}
But I hope there should be a better solution.
PS: Thank for a great tool! :)