Problems upgrading to Flex 4.5 / Mockito 1.4M5

28 views
Skip to first unread message

Marty Pitt

unread,
Apr 11, 2011, 11:36:54 AM4/11/11
to mockito-flex
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

Kris

unread,
Apr 11, 2011, 5:18:06 PM4/11/11
to mockit...@googlegroups.com
Hi,

Not sure what causes the issue but I'd try upgrading libraries one by one.

Anyone has better idea?

Regards,
Kris
Reply all
Reply to author
Forward
0 new messages