Skip to content

Port over Add xunit.netcore.extensions from buildtools#352

Merged
ViktorHofer merged 72 commits into
dotnet:masterfrom
ViktorHofer:xextensionsport
Jul 20, 2018
Merged

Port over Add xunit.netcore.extensions from buildtools#352
ViktorHofer merged 72 commits into
dotnet:masterfrom
ViktorHofer:xextensionsport

Conversation

@ViktorHofer
Copy link
Copy Markdown
Member

Port from https://github.com/dotnet/buildtools/tree/master/src/xunit.netcore.extensions

Also moved versions from the GitSyncClient to versions.props as discussed with @Anipik and fixed projects outside of the src directory in the sln.

weshaggard and others added 30 commits April 24, 2015 13:45
This library will replace XunitTraitsDiscovers as our library that
contains ActiveIssue and OuterLoop support and we can use it for
any specific xunit additions we need for .NET Core.
Remove System.Diagnostics.Contracts reference from xunit.netcore.extensions.
Move all projects from packages.config -> project.json (except for desktop
projects). Use wildcard syntax for dependency version numbers.
can properly resolve netcore50 runtime assets.
Update the build tools version to 87 and update to DNU beta7.

This also updates all the lock files in this repo.
This let's us write tests like:
```C#
[ConditionalFact("RunningWithElevatedPrivileges")]
public void TestThatOnlyRunsAsAdmin() { ... }
```
and
```C#
[ConditionalTheory("WebSocketsAvailable")]
[InlineData("http://someUrl")]
[InlineData("https://someUrl")]
public void TestThatOnlyRunsWithWebSockets(string url) { ... }
```
- Update the message that's output when the conditional member can't be found or isn't appropriate
- Mark skipped tests as skipped with a reason rather than leaving them out completely
Move to version rc2-23712 and remove all * versions.
justinvp and others added 19 commits October 2, 2016 09:51
It has been replaced by Xunit.TestPlatforms
…et#1498)

* Enable to pass a TargetFrameworkMoniker to ActiveIssueAttribute
… xunit extensibility features (dotnet#1507)

* Add xunit.netcore.extensions full framework project to be able to use xunit extensibility features
* Mark SkippedTestCase as serializable for Full Framework so that tests are marked as skipped correctly when conditions are not met
…top tests custom trace listener (dotnet#1515)

* Fix SkipOnTargetFrameworkAttribute, ActiveIssueAttribute and add Desktop tests custom trace listener
Conditional Fact and Theory in our xunit filtering is always used types from the test assembly that currently running. We are working on moving PlatformDetection code to CoreFx.Private.TestUtilities assembly as it is naturally fit there and avoid including the cs files in every test project need to use it. We have many tests using Conditional Fact/Theory which calls PlatformDetection methods. The way we apply this filtering is we create the PlatformDetection type from the running test assembly. After we move PlatformDetection to CoreFx.Private.TestUtilities, this mechanism will not work. To make it work, we adding the way to allow specify the assembly containing the type through providing the qualified type name which include the assembly name.
* Support passing Type to XUnit ConditionalFact/Theory

[ConditionalFact(typeof(PlatformDetection), "nameof(PlatformDetection.IsNonZeroLowerBoundArraySupported)")]

* Elimenate the type qualified name support
* add new ConditionalClass attribute

* fix style

* address pr feedback
@ViktorHofer ViktorHofer self-assigned this Jul 20, 2018
@@ -0,0 +1 @@
# Microsoft.DotNet.XUnitExtensions No newline at end of file

This comment was marked as spam.

This comment was marked as spam.

Copy link
Copy Markdown
Member

@safern safern left a comment

Choose a reason for hiding this comment

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

LGTM.

@ViktorHofer ViktorHofer merged commit d26900d into dotnet:master Jul 20, 2018
@ViktorHofer ViktorHofer deleted the xextensionsport branch July 20, 2018 23:11
ViktorHofer pushed a commit to ViktorHofer/arcade that referenced this pull request Oct 25, 2023
[master] Update dependencies from dotnet/arcade
- Updates:
  - Microsoft.DotNet.Arcade.Sdk: from 5.0.0-beta.20201.2 to 5.0.0-beta.20431.1

 - Add dotnet-tools feed to NuGet.config

 - Set to netcoreapp2.1

 - Add SuppressDependenciesWhenPacking to resolve NU5128
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.