Skip to main content
Known Participant
December 14, 2009
Answered

EmptyUnitTest

  • December 14, 2009
  • 1 reply
  • 871 views

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 has been closed for replies.
Correct answer Xavier Agnetti

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

1 reply

Adobe Employee
December 15, 2009

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

Known Participant
December 15, 2009

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

I'm using FlexUnit 4, btw.

Adobe Employee
December 15, 2009

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