Skip to content

Move to newer xunit.analyzers package #96

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

Closed
dougbu opened this issue Oct 27, 2017 · 3 comments
Closed

Move to newer xunit.analyzers package #96

dougbu opened this issue Oct 27, 2017 · 3 comments
Labels
Milestone

Comments

@dougbu
Copy link
Contributor

dougbu commented Oct 27, 2017

The current xunit.analyzers package (v0.7.0) is not a stable version, contains a few bugs, and we have workarounds in our test code for some of those bugs. Nothing newer is available. But, when the package is updated…

Relevant bugs and the workarounds we could remove after moving to new analyzer package:

@dougbu dougbu added the task label Oct 27, 2017
dougbu added a commit that referenced this issue Oct 31, 2017
dougbu added a commit that referenced this issue Nov 1, 2017
….Web.Razor.Test to end

- part of #65

Few manual changes:
- temporarily remove xUnit analyzers from System.Web.Razor.Test
  - work around xunit/xunit#1502
  - should restore analyzers as part of a #96 fix
- use `Assert.IsAssignableFrom<T>(...)`, `Assert.IsType<T>(...)` and `Assert.Single(...)` return values
- avoid xUnit1013, Public method should be marked as test
  - mark a helper method `internal`
- fix xUnit1026, `[Theory]` method doesn't use all parameters
  - add new data set properties
- suppress xUnit2013, Do not use equality check to check for collection size.
  - calls `Count` because the `Mock<T>` does not set up `GetEnumerable()`
- `Assert.Equal<T>(...)` -> `Assert.Equal(...)`
- avoid Linq's `.Where` inside `Assert.Contains(...)` and similar
@marcind
Copy link
Contributor

marcind commented Nov 20, 2017

FYI, 0.8.0 is available with fixes for all those issues.

@dougbu
Copy link
Contributor Author

dougbu commented Nov 20, 2017

Thanks @marcind ! And, congrats on the new release.

@dougbu dougbu added this to the 3.2.6 milestone Apr 3, 2018
@dougbu dougbu modified the milestones: 3.2.6, 3.2.7 May 11, 2018
@dougbu dougbu modified the milestones: 3.2.7, 3.2.8 Nov 6, 2018
@mkArtakMSFT
Copy link

Closing as the workarounds we have in place seem to be working, and this is not a priority work to focus on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants