Skip to content

Fix test error in TestContextOneTimeTearDownTests - #4928

Merged
stevenaw merged 3 commits into
mainfrom
onetimeteardowntests
Jan 25, 2025
Merged

Fix test error in TestContextOneTimeTearDownTests#4928
stevenaw merged 3 commits into
mainfrom
onetimeteardowntests

Conversation

@stevenaw

Copy link
Copy Markdown
Member

Fixes #4906

Re: my "filter" comments in the issue. I wasn't able to see anything of note based on an initial look.

@manfred-brands manfred-brands left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.
It proves that the result in the OneTimeTearDown matches the overall result.

Assert.That(tearDownResult, Is.Not.Null);
Assert.Multiple(() =>
{
Assert.That(tearDownResult!.Outcome, Is.EqualTo(result.ResultState));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You shouldn't need the null suppression operator !.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I can try to take a closer look at this one tomorrow. I had added it to suppress a warning, but I can also try updating the referenced version of the analyzer package. I think I saw that we currently reference 4.3.0 whereas latest is 4.6.0

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Aha. Appears I was still a few bugfix versions behind on Visual Studio. I've upgraded to latest and now no longer need the !. Thanks for pointing that out!

I've pushed the change to remove it and will merge once the builds pass

@stevenaw
stevenaw merged commit 6148a2b into main Jan 25, 2025
@stevenaw
stevenaw deleted the onetimeteardowntests branch January 25, 2025 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test error in TestContextOneTimeTearDownTests.

2 participants