infinite / mockito-flex

0 stars 0 forks source link

Constructor with internal parameter cannot be instantiated #34

Open infinite opened 10 years ago

infinite commented 10 years ago

We use factory methods to instantiate complex objects and have internal scoped types to lock the use of the constructor out of the package.

We use mockito from the same package, but it still fails to instantiate the instance:

Error at org.mockito.asmock.reflection::Type$/getTypeByName(Type.as:419) at org.mockito.asmock.reflection::DescribeTypeTypeProvider/getMethodInfo(DescribeTypeTypeProvider.as:275) at org.mockito.asmock.reflection::DescribeTypeTypeProvider/getType(DescribeTypeTypeProvider.as:63) at org.mockito.asmock.reflection::Type$/getType(Type.as:458) at org.mockito.asmock.framework.proxy::ProxyRepositoryImpl/prepare(ProxyRepositoryImpl.as:98) at org.mockito.asmock.framework::MockRepository/prepare(MockRepository.as:96) at org.mockito.impl::AsmockMockery/prepareClasses(AsmockMockery.as:76) at org.mockito::Mockito/prepareClasses(Mockito.as:236) at org.mockito.integrations.flexunit3::MockitoTestCase/runWithResult(MockitoTestCase.as:57) at flexunit.framework::TestSuite/runTest(TestSuite.as:186) at flexunit.framework::TestSuite/runNext(TestSuite.as:174) at flexunit.framework::TestSuite/runWithResult(TestSuite.as:159) at org.flexunit.internals.runners::FlexUnit1ClassRunner/run(FlexUnit1ClassRunner.as:235) at org.flexunit.runners::Suite/runChild(Suite.as:120) at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep(ChildRunnerSequencer.as:82) at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete(StatementSequencer.as:141) at org.flexunit.internals.runners.statements::StatementSequencer/evaluate(StatementSequencer.as:109) at org.flexunit.runners::ParentRunner/run(ParentRunner.as:478) at org.flexunit.runner::FlexUnitCore/beginRunnerExecution(FlexUnitCore.as:322) at org.flexunit.runner::FlexUnitCore/verifyRunnerCanBegin(FlexUnitCore.as:303) at org.flexunit.token::AsyncCoreStartupToken/sendReady(AsyncCoreStartupToken.as:84) at org.flexunit.runner.notification.async::AsyncListenerWatcher/sendReadyNotification(AsyncListenerWatcher.as:148) at org.flexunit.runner.notification.async::AsyncListenerWatcher/handleListenerReady(AsyncListenerWatcher.as:163) at flash.events::EventDispatcher/dispatchEventFunction at flash.events::EventDispatcher/dispatchEvent at flexunit.flexui::FlexUnit4TestRunner/handleConnect(FlexUnit4TestRunner.as:315) at flash.events::EventDispatcher/dispatchEventFunction at flash.events::EventDispatcher/dispatchEvent at flash.net::XMLSocket/reflectEvent