File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed
Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ public class Tests
99 public void TestWithOutDataSource ( )
1010 {
1111 var prop = TestContext . CurrentContext . Test . Properties [ "TestCaseID" ] . FirstOrDefault ( ) ?? "" ;
12- TestContext . WriteLine ( $ "{ prop } ") ;
12+ TestContext . Out . WriteLine ( $ "{ prop } ") ;
1313 Assert . That ( prop , Is . EqualTo ( "id1" ) ) ;
1414 }
1515}
@@ -32,10 +32,9 @@ public void TestWithDataSource(int number)
3232 {
3333 var x = TestContext . CurrentContext . Test . PropertyHierarchy ( ) ;
3434 Assert . That ( x . Count , number == 456 ? Is . EqualTo ( 4 ) : Is . EqualTo ( 3 ) ) ;
35- var propsa = TestContext . CurrentContext . Test . PropertyValues ( "TestCaseID" ) . Select ( o=> o . Values ) . ToList ( ) ;
36- var props = propsa . SelectMany ( o=> o . Cast < string > ( ) ) . ToList ( ) ;
35+ var props = TestContext . CurrentContext . Test . AllPropertyValues ( "TestCaseID" ) . OfType < string > ( ) . ToList ( ) ;
3736 Assert . That ( props , Is . Not . Null ) ;
38- TestContext . WriteLine ( $ "{ string . Join ( ',' , props ) } ") ;
37+ TestContext . Out . WriteLine ( $ "{ string . Join ( ',' , props ) } ") ;
3938 Assert . That ( props , Does . Contain ( "id2" ) ) ;
4039 }
4140}
Original file line number Diff line number Diff line change 1- <Project Sdk = " Microsoft.NET.Sdk " >
2-
1+ <? xml version = " 1.0 " encoding = " utf-8 " ? >
2+ < Project Sdk = " Microsoft.NET.Sdk " >
33 <PropertyGroup >
4- <TargetFramework >net6 .0</TargetFramework >
4+ <TargetFramework >net10 .0</TargetFramework >
55 <ImplicitUsings >enable</ImplicitUsings >
66 <Nullable >enable</Nullable >
7-
87 <IsPackable >false</IsPackable >
98 <IsTestProject >true</IsTestProject >
109 </PropertyGroup >
11-
1210 <ItemGroup >
13- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.8.0" />
14- <PackageReference Include =" NUnit" Version =" 4.2.0-alpha.0.37" />
15- <!-- <PackageReference Include="NUnit" Version="3.13.3" />-->
16- <PackageReference Include =" NUnit3TestAdapter" Version =" 4.5.0" />
17- <PackageReference Include =" NUnit.Analyzers" Version =" 3.9.0" />
18- <PackageReference Include =" coverlet.collector" Version =" 6.0.0" />
11+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 18.0.1" />
12+ <PackageReference Include =" NUnit" Version =" 4.4.0" />
13+ <PackageReference Include =" NUnit3TestAdapter" Version =" 6.0.0" />
14+ <PackageReference Include =" NUnit.Analyzers" Version =" 4.11.2" >
15+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
16+ <PrivateAssets >all</PrivateAssets >
17+ </PackageReference >
18+ <PackageReference Include =" coverlet.collector" Version =" 6.0.4" >
19+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
20+ <PrivateAssets >all</PrivateAssets >
21+ </PackageReference >
1922 </ItemGroup >
20-
21- </Project >
23+ </Project >
You can’t perform that action at this time.
0 commit comments