flexunit4

How can I access the test name of a FlexUnit 4 test?

In FlexUnit 1 it is possible to access the name of the currently-running test using the TestCase.getName() method because all tests subclass TestCase. In FlexUnit 4, however, there's no base class for tests; the tests are identified by annotations. So, how can I replicate the getName() functionality in FlexUnit 4? ...

FlexUnit4: [Test(expect="Error")] doesn't catch errors?

The title says it all. The following code produces a failed test, not a passing test (as I would expect): [Test(expects="Error")] public function someTest():void { throw Error("this test doesn't pass"); } ...

FlexUnit 4 and Cairngorm commands

Does anyone know if it is possible to test remote procedure calls in Cairngorm Commands with FlexUnit 4. I have an old app full of them and before I introduce FlexUnit into the mix would like to hear if anyone has been successful with this. Many thanks, ...

FlexUnit4 in IntelliJ

When I try to run test with FlexUnit4 and IntelliJ, I get this error: SecurityError: Error #2148: SWF file file:///C|/Users/LIC/Projects/ProgramJef/out/production/Flex%2DClient%2DTests/%5Fflexunit.swf cannot access local resource file:///C|/Users/LIC/Projects/ProgramJef/out/production/Flex%2DClient%2DTests/textLayout_1.1.0.604.swf. Only...

"Unable to resolve resource bundle" error when trying to run FlexUnit4 tests with IntelliJ IDEA 9.0.2

Hi everybody! I am having a trouble to get IntelliJ IDEA 9.0.2 to run FlexUnit4 tests. The tests won't be performed because of the following error: Error: Unable to resolve resource bundle "<some name>" So I checked the build.xml whether the path-elements are set properly: <path-element>resources/locale/{locale}</path-element> Thi...

FlexUnit 4 Error

Hi, I am facing a strange FlexUnit Error: Whoa... been asked to send another complete and I already did that The error seem to occur when the number of test exceede 27...? (the tests never complete) test exemple: [Test] public function whenDoingThat_expectThatIsTrue():void{ //blabla assertTrue(...) } Any he...

FlexUnit4 async test - asyncHandler's usage isn't clear

Hi, There is the doc page about FlexUnit4's async approach: http://docs.flexunit.org/index.php?title=Writing_an_AsyncTest Here is the concept that's confusing for me: // timer is a Timer instance set to tick once with a delay of TIMER_TIME. [Test(async)] public function testAsync() : void { var asyncHandler:Function = Async.asy...

How do I FlexUnit Test Parsley commands?

Hi guys, I needed some guidance on how to use FlexUnit 4 within Flash Builder, to unit test a Parsley-frameworked Flex application. I have tried lookign at one or two sites but with no avail. Thanks ...

How to use SequenceRunner with FlexUnit 4

In the FlexUnit wiki I've read about the very interesting SequenceRunner that was contributed by the Fluint folks. Now I am trying to run a test that is very similar to the example, however when executing the run() Method of the SequenceRunner instance, I get this exception: Cannot add asynchronous functionality to methods defined b...

Flex Unit 4 -- Hello World

I want to use the Flex Unit 4 Suite. I don't really have any experience with unit testing. I downloaded the Turnkey project but I was a little overwhelmed. I basically just want to start by creating a simple hello world unit test. if I have a class called MyClass with 2 methods square() and cube(). and I want to create a unit test l...

Best way to reset database to known state between FlexUnit4 integration tests?

Background: I have a Flex web app that communicates with a Java back-end via BlazeDS. The Flex client is composed of a flex-client module, which holds the views and presentation models and a separate flex-service module which holds the models (value objects) and service objects. I am in the process of writing asynchronous integration ...

BlazeDS error when running Flexunit tests: Detected duplicate HTTP-based FlexSessions

I am using the Maven Flexmojos plug-in to run some FlexUnit4 integration tests on the command line against a Jetty/Java/Spring Security/BlazeDS backend. These integration tests run in a stand-alone version of the flash player. One of these tests attempts a few different login scenarios as follows: [Test(async)] public funct...