unit testing - Flex, Flexunit: How to test that an event is dispatched twice? -
I use FlexUnit's code to test for some events in the Flex app using the addAsync method. Testing that the incidents are transmitted so far, I can ensure that at least one incident has been removed. However, I want to be a bit more elaborate; I want to make sure that the set of incidents required by me is actually sent. Is there a useful test pattern (or even different test frameworks - I'm flexible!) To accomplish this? I tried this code, but it did not apply for a second time ResultPropertyChange Expected ResultPropertyChange (Events: Events, NumbersOfAvent: Int = 1): Zero {Trace ("Event" + Event + "" + Event + Target + "+" + + "Number OffIF Events "With" + "trail left ..."); AssertTrue (event.type == Response Chenzed Event.RESPONSE_CHANGED); if ( NumberOfAventis> 1) {event.target.addEventListener (Response Changed Event. REPNSE-Changed, Adesink (Expected Result Portrait Change, 1000, Number OFAVE-1))}} Public Fu...