Skip to content

Fix CLI test warnings#1450

Merged
abhishekkumams merged 1 commit intomainfrom
dev/abhishekuma/fix_cli_test_warning
Apr 25, 2023
Merged

Fix CLI test warnings#1450
abhishekkumams merged 1 commit intomainfrom
dev/abhishekuma/fix_cli_test_warning

Conversation

@abhishekkumams
Copy link
Contributor

@abhishekkumams abhishekkumams commented Apr 25, 2023

Why make this change?

  • Some unit Tests were complaining about wrong Signature of the Class Initialization Test Setup method, due to which they were not getting discovered.

What is this change?

  • When declaring ClassInitialize attribute on a method, the method has to be static, public, void and should take a single parameter of type TestContext.
  • I added a parameter of type TestContext to fix.
  • Performance Improvement by using ClassInitialize than TestInitialize.

How was this tested?

  • Passing existing Unit Tests
  • No warnings

Copy link
Contributor

@seantleonard seantleonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for addressing! also looks like additional efficiency by using Classinitialize over testinitialize.

@abhishekkumams abhishekkumams enabled auto-merge (squash) April 25, 2023 04:06
@abhishekkumams abhishekkumams merged commit e29a3f0 into main Apr 25, 2023
@abhishekkumams abhishekkumams deleted the dev/abhishekuma/fix_cli_test_warning branch April 25, 2023 05:05
@abhishekkumams abhishekkumams added refactor improvement Let's make this better labels Apr 25, 2023
@abhishekkumams abhishekkumams added this to the Apr2023 milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Let's make this better refactor

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants