Hi
I'm in the process of upgrading an application. We
were using:
- Flex 4.1
- FlexUnit 4
- Mockito 1.3-RC3
I'm trying to upgrade to:
- Flex 4.5
- FlexUnit 4.1.0-RC2
- Mockito 1.4-M5
After upgrading I'm getting errors in tests that
previously worked fine.
Specifically, tests which try to use a stub, fail.
Eg:
[
Mock]
public
var
tagRepository:TagsRepository;
[
Test]
public
function
whenStarringAMessage_afterUpdate_messageShowsAsStarred():void
{
var tag:Tag =
Tag.createWithIdAndName(123,Tag.STAR_TAGNAME);
given(tagRepository.getTagForId(123)).willReturn(tag);
}
ReferenceError: Error #1065: Variable
TagsRepository600780127291428E3F3BE5734A9EEBA06C3F4D50 is not defined.
at
global/flash.utils::getDefinitionByName
at
org.flemit.reflection::Type$/getType
at
org.floxy::InterceptorProxyListener/methodExecuted
at
asmock.generated::TagsRepository600780127291428E3F3BE5734A9EEBA06C3F4D50/getTagForId
**[
at
com.vzw.syncconnect.inbox.controller::AssignTagToMessageCommandTests/whenStarringAMessage_afterUpdate_messageShowsAsStarred(AssignTagToMessageCommandTests.as:114)
]
I've tried this using both the old [RunWith] and the new
[Rule] MockitoRule() approaches.
Are there issues using Mockito / asmock / flemit etc.,
in the 4.5 stack? Any other ideas what would cause this?
Thanks,
Marty