Open BlueRaja opened 10 years ago
Did you ever solve this? Im having the same problem.
No, the framework is broken and apparently no one cares about it.
Ahh damn :( Some of us still have legacy projects to maintain!
I believe it is to do with trying to mock concrete classes instead of interfaces. If the concrete class throws an error in the constructor then you get this error.
Scratch all that, the problem was simply because I forgot to prepare on of the dependencies, doh!
Using the prebuilt Mockolate v0.12.4 from here, and the latest version of FlexUnit that comes with FlashBuilder Professional (FlexUnit 4.1 I think).
My code looks like this:
The line
throws an exception
The same thing happens when using
nice()
.If I create mocked fields using
MockolateRule
everything works perfectly, but of course that greatly reduces the flexibility of my tests, since I can no longer create mocks within the tests.Does anyone know why this is happening or how to fix it?