Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IClassFixture<ThreadExceptionFixture> to all tests #2684

Merged
merged 1 commit into from Jan 13, 2020

Conversation

@hughbe
Copy link
Contributor

hughbe commented Jan 10, 2020

Proposed Changes

  • Add IClassFixture<ThreadExceptionFixture> to all tests
Microsoft Reviewers: Open in CodeFlow
@hughbe hughbe requested a review from dotnet/dotnet-winforms as a code owner Jan 10, 2020
@hughbe hughbe force-pushed the hughbe:Add-ThreadExceptionFixture branch from 8ca6f8b to cb59c5c Jan 10, 2020
@sharwell

This comment has been minimized.

Copy link
Member

sharwell commented Jan 10, 2020

Would it be better to have a common abstract base class for all tests? It would certainly be more maintainable.

@weltkante

This comment has been minimized.

Copy link
Contributor

weltkante commented Jan 11, 2020

Its also possible to build something like the AssemblyFixture example, would certainly be less redundant then annotating every class manually. Though if you are already using a TestFrameworkAttribute you need to make sure you build off of that (subclassing it) when implementing an AssemblyFixtureAttribute since you most likely can only have one test framework per assembly.

@hughbe hughbe force-pushed the hughbe:Add-ThreadExceptionFixture branch from cb59c5c to 316c834 Jan 11, 2020
@codecov

This comment has been minimized.

Copy link

codecov bot commented Jan 11, 2020

Codecov Report

Merging #2684 into master will increase coverage by 0.00477%.
The diff coverage is n/a.

@@                 Coverage Diff                 @@
##              master       #2684         +/-   ##
===================================================
+ Coverage   57.58494%   57.58972%   +0.00478%     
===================================================
  Files           1239        1239                 
  Lines         418349      418349                 
  Branches       38812       38812                 
===================================================
+ Hits          240906      240926         +20     
+ Misses        172065      172047         -18     
+ Partials        5378        5376          -2
Flag Coverage Δ
#Debug 57.58972% <ø> (+0.00477%) ⬆️
#production 31.30843% <ø> (+0.00782%) ⬆️
#test 98.93347% <ø> (ø) ⬆️
@RussKie

This comment has been minimized.

Copy link
Member

RussKie commented Jan 13, 2020

Would it be better to have a common abstract base class for all tests? It would certainly be more maintainable.

Yes, though there be dragons - developers often turn base classes into a dependency nightmare.

Its also possible to build something like the AssemblyFixture example ,

This is interesting, thanks for sharing.

We can certainly iterate the ideas going forward.

@RussKie RussKie merged commit fde3805 into dotnet:master Jan 13, 2020
5 checks passed
5 checks passed
WIP Ready for review
Details
dotnet-winforms CI Build #20200111.1 succeeded
Details
dotnet-winforms CI (Build Windows Debug) Build Windows Debug succeeded
Details
dotnet-winforms CI (Build Windows Release) Build Windows Release succeeded
Details
license/cla All CLA requirements met.
Details
@msftbot msftbot bot added this to the 5.0 milestone Jan 13, 2020
@RussKie RussKie removed this from the 5.0 milestone Jan 13, 2020
@hughbe hughbe deleted the hughbe:Add-ThreadExceptionFixture branch Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.