Flex Unit 4 Doesnt wor with AS4 Mock

Hi,
Wehen I run the Mock 4 AS script with the Flex Unit 4 I get the dblow error.
ArgumentError: Error #1063: Argument count mismatch on org.mock4as.samples.publisher::PublisherTest
at flexunit.framework::TestSuite(TestSuite.as:124)
at org.flexunit.internals.runners::FlexUnit1ClassRunner/createTestSuiteWithFilter(FlexUnit1C lassRunner.as:167)
at org.flexunit.internals.runners::FlexUnit1ClassRunner(FlexUnit1ClassRunner.as:100)
at org.flexunit.internals.builders::FlexUnit1Builder/runnerForClass(FlexUnit1Builder.as:60)
at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass(RunnerBuilderBase.as:63)
at org.flexunit.internals.builders::AllDefaultPossibilitiesBuilder/runnerForClass(AllDefault PossibilitiesBuilder.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:14 8)
**[ at FlexUnitApplication/onCreationComplete(FlexUnitApplication.mxml:22) ]
**[ at FlexUnitApplication/___FlexUnitApplication_Application1_creationComplete(FlexUnitApplicat ion.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)
How can I resolve this error.

Here is code snippet I am using
package org.mock4as.samples.publisher
import flexunit.framework.TestCase;
import org.mock4as.Mock;
    public class PublisherTest extends TestCase
public function PublisherTest(methodName : String){
            super(methodName);
public function testOneSubscriberReceivesAMessage():void{
// create the mock
var mockSubscriber:MockSubscriber = new MockSubscriber();
const MSG:String = "MESSAGE";
// set expectations
mockSubscriber.expects("receive").times(1).withArg(MSG).noReturn();
// inject the mock
var myPublisher:Publisher = new Publisher();
myPublisher.add(mockSubscriber);
// execute
myPublisher.publish(MSG);
// verify mock behavior
mockSubscriber.verify();
// show mock expectation error message if any
assertNull(mockSubscriber.errorMessage());
// Inner Class
import org.mock4as.Mock;
import org.mock4as.samples.publisher.ISubscriber;
class MockSubscriber extends Mock implements ISubscriber {
public function receive(message:String):void
record("receive", message);

Similar Messages

  • [svn:osmf:] 10655: Removing the hack we came up with for using the MAST plugin in the Flex unit tests .

    Revision: 10655
    Author:   [email protected]
    Date:     2009-09-28 13:52:01 -0700 (Mon, 28 Sep 2009)
    Log Message:
    Removing the hack we came up with for using the MAST plugin in the Flex unit tests.
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/.actionScriptProperties
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/MediaFrameworkTests.as
    Removed Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/mast/
        osmf/trunk/plugins/MASTLib/

    Hi OMAW8,
    It would be better if you could share us the detailed error message in English.
    Do you mean that you could run your test in your build agent machine? If so, I doubt that it would be related to the TFS build. I mean that maybe it is not the test issue.
    Please share the detailed error in English, and then post this issue to the TFS-build forum would be better for this issue since it works well in build agent machine.
    Form link:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=tfsbuild
    Reference:
    https://msdn.microsoft.com/en-us/library/hh691189.aspx
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Flex Error #1001: Digest mismatch with RSL error

    I apologize if this is not the correct location for this question but it was the closest I could find.
    I am working in salesforce trying to add a new content pack.  This screen uses a tool written in flash.  The screen that comes up is an error with the following:
    Flex Error #1001: Digest mismatch with RSL
    https://cs13.salesforce.com/_swf/121310/sfc/flex/framework_3.5.0.12683.swf.
    Redeploy the matching RSL or relink your application with the matching
    library.
    I have been working with SalesForce support but they don't have a clue and want to punt to Adobe. 
    The support staff at SalesForce has no trouble accessing the page with the flash control from thier pc.  I have tried several computers in my office and from several browsers (IE 9 and Chrome).  I have reinstalled Flash Player 11 and cleared browser caches.  Nothing seems to work.
    It has to be something common to computers in my office or my network.  All of the information I can find on the Internet talks about rebuilding the application and redeploying it.  I can't do that since this is part of SalesForce and not something I own.  Also, it works for them on their computers.
    I am running windows 7 64 bit.  I have McAfee running (and have checked that Flash is not blocked).
    The flash player itself works when I go to the Adobe site and try other content.
    The only other odd thing I have is that my hard drive is encrypted.
    Any ideas?
    Thanks,
    Mike

    Chris,
      I have cleared the browsser and flash cache data then restarted browswers and windows. Still no luck.  I reverted the flash player back to 10.3 after following the instructions in the link you provided for a clean install but still get the error.  SalesForce did not state what version of FlashPlayer they are using but I will check with them later today. 
    All of the machines that I have tested on have been at the office and all have encrypted hard drives with PGP desktop.  I am going to try my laptop on my home network tonight to see if we are blocking something during the download.
      This is driving me nuts.  I know is it something specific to the machines in the office or the office network but I can't find it.
    Thanks for your help.  Please let me know if you have any other ideas.
    Mike

  • Help me! I have a new iPad mini that won't turn on. It was working fine this morning then i turn it off and it never turns back on. it doesnt register with iTunes and resetting isnt working either.

    Help me! I have a new iPad mini that won't turn on. It was working fine this morning then i turn it off and it never turns back on. it doesnt register with iTunes and resetting isnt working either. All I did is download instagram and snapchat and poof doesnt work. I have had these apps before!

    Make sure it's plugged into the charger.
    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Home button not working or unresponsive, fix
    http://appletoolbox.com/2013/04/home-button-not-working-or-unresponsive-fix/
    Fixing an iPad Home Button
    http://tinyurl.com/om6rd6u
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • Hi.have a g5 mac,dual core 2.3 unit.i bought it with no hard drive.have got hard drive,formatted for mac.i am trying to load osx.i get a grey screen with a small box in the centre with 2 character faces,and then grey apple with loading icon spinning.help?

    hi.have a g5 mac,dual core 2.3 unit.i bought it with no hard drive.have got hard drive,formatted for mac.i am trying to load osx.i get a grey screen with a small box in the centre with 2 character faces,and then grey apple with loading icon spinning.nothing is loading tho.

    I see 10.6.3 in your profile---is tthat what you are trying to load? If so, it won't work. No PowerPC Mac like your G5 can run a Mac OS version higher than 10.5.8

  • Running Flex Unit in AIR

    Hi I am loving flex unit and wanted to use it on a air app I developed a few months back.
    I added an new application.mxml file to the project and added the TestRunnerBase and a ref to FlexUnitCore.
    When I try to debug the app, the debugger starts but the app never becomes visible. I can see the process in windows explorer but can not see the app on the screen. If I take out the reference to FlexUnitCore it runs fine. Of course the tests can not run. Am I doing something wrong or is Air not supported?
    Air 1.5
    Flex 3.2
    Any pointers appreciated.

    You may be using an outdated version of FlexUnit, check out this example mxml from the most current master version over at github. http://github.com/flexunit/flexunit/blob/master/FlexUnit4SampleCIProject/src/test/flex/Air TestRunner.mxml
    If you don't see that an AirCIListener is available to use, then download the latest source from here : http://github.com/flexunit/flexunit or if you just want the compiled .swcs to add to your project you can grab them here http://flexunit.digitalprimates.net:8080/job/FlexUnit4-Flex3.5/lastSuccessfulBuild/artifac t/flexunit-4.0.0.zip

  • I book doesnt work with power cord only

    Hello. I was just using my ibook g4 and shut it down. When i tried to turn it back on it worked for about 5 minutes then it shut off. I tried taking out the battery and holding down the power button for 5 seconds among other things. I gave up and borrowed a friends battery, he has the same model as me and that battery doesnt work either. I tried just using the power cord only and that doesnt work either. Do i need to take it in to a professional? I've tried just about everything.

    Hey Caesar and Welcome to Apple Discussions,
    So your header reads:
    "i book doesnt work with power cord only "
    Is that right? Will it run only on the battery?
    If so this is from the manual:
    "The computer runs with battery, but not with the power adapter plugged into
    wall outlet
    1. Try known-good power outlet.
    2. Try known-good power adapter and power cord.
    Note:
    Verify that power adapter connector glows amber or green. If the power
    adapter light is green, turn over the computer and press the battery button. The
    battery lights should glow green and stay on if the power adapter is operating
    correctly.
    3. Reset the power manager by pressing the key combination Control-Option-Shiftpower.
    Warning: Make sure you do not hold down the "fn" key when resetting the
    power manager.
    Warning: Resetting the power manager means you will also need to reset the
    date and time (using the Date & Time control panel).
    4. Replace DC board.
    5. Replace logic board."
    and it would help to know exactly which iBook you have but this is pretty generic.
    Richard

  • I am traveling from the united states to ireland with an IPAD2 what type of adapter do i need?

    i am traveling from the united states to ireland with an IPAD2  what type of adapter do i need?

    All you need is a plug adapter. The charger that came with the iPad works world-wide.

  • Error handling message: flex.messaging.MessageException: No destination with id '' is registered with any service

    Hi,
    We are using both Remoting and HttpService calls for our business application.
    We were able to communicate with the LCDS server till this point with whatever default settings provided for AMFChannel configuration in services-config.xml through a flex client. Also we have a clustered environment for this servers which works out fine till now.
    Now for performance enhancement improvements, we started using Caching Mechanism for our HttpService urls (through some third party service), which will now be cached on the network instead of accessing every time from our clustered servers. But all our AMF calls through Remoting services are still the same.
    So after migrating to this Caching environment, we started encountering intermittent issues where some of our AMF calls were failing with falling exception trace :
    16:03:40,576 INFO [STDOUT] [Flex] [ERROR] Error handling message: flex.messaging.MessageException: No destination with id '' is registered with any service.
    incomingMessage: Flex Message (flex.messaging.messages.CommandMessage)
    operation = invalid.12
    clientId = D7855C44-810B-64AB-C176-7C38F83DEB2C
    correlationId =
    destination =
    messageId = 2DA6BDB8-859E-8AE1-03A4-57743DE03188
    timestamp = 1247007820561
    timeToLive = 0
    body = {}
    hdr(DSId) = D77C6BD2-3808-1512-3984-CCF397428E35
    hdr(DSEndpoint) = my-amf
    errorReply: Flex Message (flex.messaging.messages.ErrorMessage)
    clientId = D7855C44-810B-64AB-C176-7C38F83DEB2C
    correlationId = 2DA6BDB8-859E-8AE1-03A4-57743DE03188
    destination =
    messageId = D7855C64-3E08-466B-96F8-5BAE7D385129
    timestamp = 1247007820574
    timeToLive = 0
    body = null
    code = Server.Processing
    message = No destination with id '' is registered with any service.
    details = null
    rootCause = null
    body = null
    extendedData = null
    So i do not understand, most of the times the AMF calls works correctly and some times it fails with above fail trace.
    Any suggestions would be appreciated.
    Thanks,
    FlexPirate

    It might be a bit late but replying for anyone who lands on this page facing this same problem.
    The solution for "No destination with id '<my dest id>' is registered with any service" problem is that you have to make sure your destination definition is added in your:
    C:\ColdFusion9\wwwroot\WEB-INF\flex\messaging-config.xml
    Secondly, If you are deploying it on a ColdFusion Server, then you have to make sure exact same definition is added in Server messaging-config.xml file as well.
    This should solve this problem.
    While we are at it, wanted to point another possible gotcha.
    if your Server is using SSL protocol i.e. it has https:// rather than http://, Then within your <destination> definition block in messaging-config.xml, you have to add appropriate secure channels in <channels> section. You can find all available channel definitions in
    C:\ColdFusion9\wwwroot\WEB-INF\flex\services-config.xml

  • Iphone doesnt sync with itunes anymore

    itunes doesnt sync with iphone anymore

    Try "resetting" ...
    Hold the On/Off Sleep/Wake button and the Home button down at the same time for at least ten seconds, until the Apple logo appears.

  • [svn:osmf:] 14261: Updated DRM unit tests to work with code review feedback .

    Revision: 14261
    Revision: 14261
    Author:   [email protected]
    Date:     2010-02-18 14:15:23 -0800 (Thu, 18 Feb 2010)
    Log Message:
    Updated DRM unit tests to work with code review feedback.
    Modified Paths:
        osmf/trunk/framework/OSMFTest/org/osmf/elements/TestParallelElementWithDRMTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/elements/TestSerialElementWithDRMTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/traits/TestDRMTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/utils/DynamicDRMTrait.as

    Hello Alex,
    I don't have an answer for you.
    But, can you try to use http://drmtest2.adobe.com:8080/Content/anonymous.f4v with locally hosted OSMF player? This content doens't require user/pass info.
    I'm wondering that Google TV's flash player doesn't support prompt dialog.
    http://drmtest2.adobe.com/AccessPlayer/player.html requires flash player 11. That's why it won't be loaded with flash player 10.x.
    Thanks,
    -- Hiroshi

  • Slected no of records doesnt match with the no of records transferred

    Hai BI EXPERTS
    SINCE FROM LONG THE DATA PACKET IS RED IN COLOUR WITH THE ERROR MESSAGE 'SELECTED NO RANGES DOESNT MATCH WITH NO OF RECORDS TRANSFERRED'
    PLS EARLY ANSWERS=HIGH POINTS

    Hello,
    check for IDOC's in BD87 and just see if any thing is pending or not...
    if yes then execute them manually.
    Also check SM58 and is some LUW are waiting process them manully if possible.
    Also try to see the job log in the spource system in SM37 for the user ALEREMOTE and go inside each job and check the one for your data source...and check where it is stuck.
    also check for teh system connection and try to see if the jobs are running for other data source.
    Also check if the job in BW is running in SM37 for this data load or not.
    You can try to cancel all the jobs in BW...turn the total status of the request to RED and then delete it and execute the infopackage..it will ask for repeat and you can repeat the load.
    If DTP then just schedule the DTP after deleting gthe request.
    Thanks
    Ajeet

  • Why is the fb video call doesnt work with macbook?

    why is the fb video call doesnt work with macbook?

    Hi
    Just to correct GerdW - the vis of a polymorphic vi do not have to have the same output.
    Have a look at the vis I attached. I just pass a dbl to a polymorphic vi and get a dbl in one vi and a string in the other.
    The real problem is that the vi has to be set to the necessary type. If there are different inputs you just can wire them to the polymorphic vi, but this does not work with the outputs, so you have to set the type.
    Hope this helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    Polymorph.zip ‏14 KB

  • Attention! Laptop Lenovo IdeaPad Flex 10 is not compatible with Windows 8.1

    Attention!
    Laptop Lenovo IdeaPad Flex 10 is not compatible with Windows 8.1 and Windows 8.1 Update (pre-installed operating system is Windows 8.0) .
    More specifically, after update for Windows 8.1 all the  drivers (including the latest)  Intel (R) Iris (TM) graphics, Intel (R) Iris (TM) Pro graphics and Intel (R) HD GRAPHICS  installed on this laptop  does not support out of the sleep mode.
    This has been checked many times by different users laptop Flex 10.
    Any comments from Lenovo are absent. By Lenovo specifications for this notebook there are no conflicts with Windows 8.1. It is not true!
    It is unclear why Lenovo has admitted this deficiency.
    I think Lenovo Flex 10 is a mistake that will cost the company Lenovo.

    Mine came with Windows 8.1

  • Line Order No doesnt match with Invoice line number

    At the line level , the line order no doesnt match with the invocie line number
    ie. say for example in a sales order we have 3 lines
    1. A
    2. B
    3. C
    where as in transaction at AR level the line no is different
    1. B
    2. A
    3. C
    the customer wants in AR also the line no should be same as sales order line nos
    Please help us what is the setup where we define the line level numbering in AR.
    I have checked the line ordering rules but i am not clearly understanding, if anyone can explain with an example how this no generates witht he setup details it would be great

    This can be done in XSL OR in procedure on the DB side. Performance wise better to do in procedure as mentioned by other use. You can choose to go with DB or XSL approach depending on number of orders you are expecting in a single message. If it is going to be 100s or few thousand messages then keeping it in XSL is not a problem. But if you are planning tens or hundreds of thousands of orders in the same request then better do it in stored procedure.
    How do you do in XSL?
    1. Put a for each on every unique order no. You can use xsl:Key or xslt:distinct-values() for this.
    2. Within for each unique value of order no, use position() function to pass line/order no as 1,2,3... etc. As soon as the loop moves to second iteration for the next unique order no, count will automatically start again from 1,2,3... and so on.
    Apart from slightly slower processing time, another drawback from this approach is that the data in the XML you send to DB procedure will be sorted by order numbers. All orders with same number will appear together.
    Another problem with this approach is that this will work only within one request, i.e. if the next request contains an order with same no which was already sent in a previous request, for this order the count will again start from 1. So if you want to keep the sequencing maintained across multiple requests, the easiest way to do is in the DB procedure where you can lookup in the table before inserting a new row and insert with next sequence of that order no.

Maybe you are looking for

  • Audio problem with 2gen ipod touch

    Recently I've been having issues with my second generation Ipod Touch and I'm hoping that someone will be able to help me. The problem is a bit strange, so please bear with me as I try to explain it. As I said, I have a second generation 8GB Ipod Tou

  • Battery LIfe in Macbook Pro 2012- complete joke

    Hi All, just got a new macbook pro for xmas. It was a refurbushed one from July 2012 which comes with warranty etc etc. Firstly am pretty annoyed as think Appple is really going downhill fast (iphone 5 have seem issues with battery but service in hk

  • Web Gallery only shows 10 pictures cs4

    When I try to create a web gallery in Bridge CS4 and/or Photoshop CS4 only ten images are included even though I have selected many more than 10.  I have tried different column and row configurations, I have reinstalled, but it still only includes th

  • Java Document Paragraph Colors

    Hi, I want to change Background color of Styled Document. I am able to change text color through StyleConstants.setForeground(styles, Color,RED); Its changing background color for text. If text ends at middle of line then color applied to half line o

  • Exporting 1920x1080 30p

    Hello, I am evaluating the trial version of PrE 8, but I can´t seem to find a way to export (mpeg2 or mp4) with a resolution of 1920x1080 and 30 fps progressive. ( I have a camera that is 1080p and I want to keep the final result that way) observatio