Unit Testing Flex Event Handlers -
What methods do you use for Unit Test Handler, especially if they require information from the event (eg Mouse coordinates, or the goal of the event)? Is it the most common thing to re-apply the behavior in a method, which is going to be lifted, while the handler only removes information from the event, or are there effective methods of simulating event sendings in FlexNet or Fluent?
Most of the times I prepare an event object manually and send the object to that object I am especially heard, especially because I'm sure there is no floating there. Event listeners who are not removing properly Sometimes I run in a situation where my test class does not have access to the object that sends the test. Sus . If this is the case, then I separate the business logic from the actual event listener method, keep the event listener method extremely simple and light , and test the business logic. Dispatching from the object is better though, if you can
FlexUnit and Flunit do not provide any "simulation" of the transmission event; If you can use the object, you will be able to dispatch from it, and if you can not, FlexUnit / Fluent may not be either.
While using the Event, however, you would like to understand that FlexUnit / Flunit async units provide ways to test. To settle a fake incident means that you are starting an action that does not end when the law is over, so you have to make an asynchronous test. The documentation for FlexNet is in their ASDOX, and there is a good online doctor set on their home site in Flunate:
Comments
Post a Comment