如何对 Flex 应用程序进行单元测试?

发布于 2024-09-11 13:55:26 字数 44 浏览 1 评论 0原文

Flex 是一种基于事件的客户端语言。如何模拟此类事件以允许进行单元测试?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鯉魚旗 2024-09-18 13:55:26

查看 FlexUnitFlexMonkey

如果您将组件写入用户界面而不是具体组件,则模拟对象就像新实现一样简单。

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.

天暗了我发光 2024-09-18 13:55:26

还有 AS3 的真实模拟库。看一下本教程:

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

和 Mockolate 库。我实际上使用过mock-as3,它是Mockolate的祖先。有了它,您可以创建假对象,这些对象就像虚拟外观一样,用于与您的测试无关的事情:这样您就可以专注于测试特定的代码片段(无论是否在 UI 类中),将其与其依赖项解耦。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文