• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

EmptyUnitTest

New Here ,
Dec 14, 2009 Dec 14, 2009

Copy link to clipboard

Copied

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

TOPICS
FlexPMD

Views

664

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Dec 15, 2009 Dec 15, 2009

And I have attached a fix for it.

Can you test it, please?

Xavier

Votes

Translate

Translate
Adobe Employee ,
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

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

I'm using FlexUnit 4, btw.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

And I have attached a fix for it.

Can you test it, please?

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 15, 2009 Dec 15, 2009

Copy link to clipboard

Copied

LATEST

I no longer see those EmptyUnitTest violations. Thanks dude

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines