Open infinite opened 10 years ago
From loomis on 2010-06-10 17:01:50+00:00
You need to make sure you reference MockitoClassRunner symbolically somewhere in your codebase (in the metadata you have only textual reference which does not make this class to link with the unit testing app).
The other option is to add a -include-libraries {path_to_mockito.swc} compiler option. That way all the classes from the specified swc get linked with the app.
I'm not quite sure why you had to add asmock to the set of libraries. Mockito 1.3 has asmock bundled inside.
From Anonymous on 2010-06-11 13:26:54+00:00
yea sorry thats my fault. I forgot to change the -include-libraries compiler option as I was using asmock earlier. Prob explain why it needed asmock
Hi I just download the latest release (1.0 RC3) and have found a couple of things.
{{{ [RunWith("org.mockito.integrations.flexunit4.MockitoClassRunner")] }}}
but I am getting this error running in flash builder 4:
{{{
!Error: Custom runner class org.mockito.integrations.flexunit4.MockitoClassRunner should be linked into project and implement IRunner. Further it needs to have a constructor which either just accepts the class, or the class and a builder.
at org.flexunit.internals.runners::InitializationError(InitializationError.as:50) at org.flexunit.internals.builders::MetaDataBuilder/createInitializationError(MetaDataBuilder.as:201) at org.flexunit.internals.builders::MetaDataBuilder/buildRunner(MetaDataBuilder.as:142) at org.flexunit.internals.builders::MetaDataBuilder/runnerForClass(MetaDataBuilder.as:115) at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass(RunnerBuilderBase.as:63) at org.flexunit.internals.builders::AllDefaultPossibilitiesBuilder/runnerForClass(AllDefaultPossibilitiesBuilder.as:106) at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass(RunnerBuilderBase.as:63) at org.flexunit.runners.model::RunnerBuilderBase/localRunners(RunnerBuilderBase.as:119) at org.flexunit.runners.model::RunnerBuilderBase/runners(RunnerBuilderBase.as:87) at org.flexunit.runners::Suite(Suite.as:170) at org.flexunit.runner::Request$/classes(Request.as:201) at Function/http://adobe.com/AS3/2006/builtin::apply at org.flexunit.runner::FlexUnitCore/runClasses(FlexUnitCore.as:191) at Function/http://adobe.com/AS3/2006/builtin::apply at org.flexunit.runner::FlexUnitCore/run(FlexUnitCore.as:171) at flexunit.flexui::FlexUnit4TestRunner/run(FlexUnit4TestRunner.as:75) at flexunit.flexui::FlexUnitTestRunnerUI/runWithFlexUnit4Runner(FlexUnitTestRunnerUI.mxml:148) _[ at FlexUnitApplication/onCreationComplete(FlexUnitApplication.mxml:24) ] _[ at FlexUnitApplication/___FlexUnitApplication_Application1_creationComplete(FlexUnitApplication.mxml:7) ] at flash.events::EventDispatcher/dispatchEventFunction at flash.events::EventDispatcher/dispatchEvent at mx.core::UIComponent/dispatchEvent(UIComponent.as:12266) at mx.core::UIComponent/set initialized(UIComponent.as:1577) at mx.managers::LayoutManager/doPhasedInstantiation(LayoutManager.as:759) at mx.managers::LayoutManager/doPhasedInstantiationCallback(LayoutManager.as:1072)
}}}