문제

Can I use FlexUnit to unit test a File Upload and delete? Are those actions good examples of unit testing?

I'm a little new to unit testing and trying to figure out what parts of my UI are suitable for unit tests.

Thanks for any helpful tips.

도움이 되었습니까?

해결책

The actual file operations will always be executed by native classes (such as FileReference), which you should not try to unit test - that's Adobe's responsibility, at least until Flex has left the Apache incubator.

As a rule of thumb: Always unit test only the code you wrote yourself. You can decouple it by replacing all external dependencies with test doubles (i.e. stubs or mocks, for example using mockolate).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top