2

Flex is a client-side language and based on events. How can such events be mocked to allow unit testing?

Matthew Murdoch
  • 30,874
  • 30
  • 96
  • 127
Joseph
  • 806
  • 5
  • 17
  • 34

2 Answers2

0

Take a look at FlexUnit and FlexMonkey

If you are writing your components to user Interfaces rather than concrete components, mocking objects is as simple as a new implementation.

Gregor Kiddie
  • 3,119
  • 1
  • 19
  • 16
0

There are also real mock libraries for AS3. Take a look at this tutorial:

http://www.allenmanning.com/?p=7

and the Mockolate library. I have actually used mock-as3, which is Mockolate's ancestor. With it you can create fake objects that act like dummy facades for things irrelevant to your testing: this way you can focus on testing a specific piece of code (be it in a UI class or not) decoupling it from its dependencies.

ettore
  • 678
  • 12
  • 20