File tree 5 files changed +9
-24
lines changed
5 files changed +9
-24
lines changed Original file line number Diff line number Diff line change 1
- using System ;
1
+ #pragma warning disable xUnit1041 // This sample uses an alternate fixture source that xUnit1041 doesn't understand
2
+
3
+ using System ;
2
4
using Xunit ;
3
5
4
6
// The custom test framework enables the support
Original file line number Diff line number Diff line change 5
5
As noted in https://github.com/xunit/assert.xunit#annotations we enable all the supported flags for the newest
6
6
assertion library features that are supported for v2.
7
7
-->
8
- <DefineConstants >$(DefineConstants);XUNIT_IMMUTABLE_COLLECTIONS;XUNIT_NULLABLE;XUNIT_SPAN;XUNIT_VALUETASK </DefineConstants >
8
+ <DefineConstants >$(DefineConstants);XUNIT_IMMUTABLE_COLLECTIONS;XUNIT_NULLABLE;XUNIT_SPAN</DefineConstants >
9
9
<Nullable >enable</Nullable >
10
10
<TargetFramework >net6.0</TargetFramework >
11
11
</PropertyGroup >
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Threading . Tasks ;
3
2
using Xunit ;
4
3
5
4
namespace ExampleTests ;
@@ -31,20 +30,4 @@ public void SpanExample()
31
30
32
31
Assert . Equal ( x , y ) ;
33
32
}
34
-
35
- // Important: although the assertion library enables support for ValueTask, your
36
- // test methods must still return void or Task; if you return ValueTask, the behavior
37
- // is undefined (they will likely silently pass rather than fail appropriately). This
38
- // is because support for ValueTask-based test methods is not supported with the
39
- // v2 core framework.
40
- [ Fact ]
41
- public async Task ValueTaskExample ( )
42
- {
43
- int [ ] values = new [ ] { 4 , 5 } ;
44
-
45
- await Assert . AllAsync (
46
- values ,
47
- value => Assert . IsEvenAsync ( value )
48
- ) ;
49
- }
50
33
}
Original file line number Diff line number Diff line change 1
1
<Project >
2
2
3
3
<PropertyGroup >
4
- <MicrosoftNetTestSdkVersion >17.6.2 </MicrosoftNetTestSdkVersion >
5
- <XunitAnalyzersVersion >1.2.0-pre.27 </XunitAnalyzersVersion >
6
- <XunitV2Version >2.5.0-pre.37 </XunitV2Version >
7
- <XunitRunnerVSVersion >2.5.0-pre.22 </XunitRunnerVSVersion >
4
+ <MicrosoftNetTestSdkVersion >17.8.0 </MicrosoftNetTestSdkVersion >
5
+ <XunitAnalyzersVersion >1.8.0 </XunitAnalyzersVersion >
6
+ <XunitV2Version >2.6.4 </XunitV2Version >
7
+ <XunitRunnerVSVersion >2.5.6 </XunitRunnerVSVersion >
8
8
</PropertyGroup >
9
9
10
10
</Project >
Original file line number Diff line number Diff line change 3
3
<packageSources >
4
4
<clear />
5
5
<add key =" api.nuget.org" value =" https://api.nuget.org/v3/index.json" protocolVersion =" 3" />
6
- <add key =" myget.org/F /xunit" value =" https://www.myget.org/F /xunit/api/v3 /index.json" protocolVersion =" 3" />
6
+ <add key =" feedz.io/xunit /xunit" value =" https://f.feedz.io/xunit /xunit/nuget /index.json" protocolVersion =" 3" />
7
7
</packageSources >
8
8
</configuration >
You can’t perform that action at this time.
0 commit comments