Skip to main content
Known Participant
Dec 14, 2009 7:49 PM UTC
Answered

EmptyUnitTest

Hi again,

  This rule, EmptyUnitTest, keeps complaining that "A test should contain at least one assertion". But, in my asynchrounous tests I perform only two things: a "Async.handleEvent(...)" and then a call to the method that will trigger the event. There are no assertions in this function but the assertions are placed in the handler function of the event.

  Shouldn't this rule check whether there's an "async" option in the test metadata tag?

Regards,

  Alex

This topic is closed to new replies. Start a new post to keep the conversation going.
Xavier AgnettiCorrect answer
Inspiring
Dec 15, 2009 3:56 PM UTC

I have attached a Maven Flex project with an asynchronous FlexUnit4 test


And I have attached a fix for it.

Can you test it, please?

Xavier

6 replies

Inspiring
Dec 15, 2009 10:39 AM UTC

It sounds like a enhancement to this rule.

Could you log a bug in JIRA attaching a example?

Are you using FlexUnit 4 or FlexUnit 0.9?

Xavier

Translate
Known Participant
Dec 15, 2009 11:04 AM UTC

Ok. New enhancement request: https://bugs.adobe.com/jira/browse/FLEXPMD-132

I'm using FlexUnit 4, btw.

Translate
Inspiring
Dec 15, 2009 12:56 PM UTC

Thanks for the feature request.

It would be great if you could attach a example file, I could add it to unit test suite.

Thanks.

BTW: I advise you to "watch" the issue in JIRA, in order to be notified when the issue is resolved.

Xavier

Translate