File tree Expand file tree Collapse file tree 9 files changed +40
-23
lines changed
MaterialDesignColors.Wpf.Tests
MaterialDesignThemes.UITests
MaterialDesignThemes.Wpf.Tests Expand file tree Collapse file tree 9 files changed +40
-23
lines changed Original file line number Diff line number Diff line change 11<Project >
22 <ItemGroup >
33 <PackageVersion Include =" BluwolfIcons" Version =" 1.0.1" />
4- <PackageVersion Include =" CommunityToolkit.Mvvm" Version =" 8.2.2 " />
4+ <PackageVersion Include =" CommunityToolkit.Mvvm" Version =" 8.4.0 " />
55 <PackageVersion Include =" Dragablz" Version =" 0.0.3.234" />
6- <PackageVersion Include =" GitHubActionsTestLogger" Version =" 2.3.3 " />
6+ <PackageVersion Include =" GitHubActionsTestLogger" Version =" 2.4.1 " />
77 <PackageVersion Include =" Humanizer" Version =" 2.14.1" />
88 <PackageVersion Include =" MahApps.Metro" Version =" 2.4.10" />
99 <PackageVersion Include =" Microsoft.CodeAnalysis.Analyzers" Version =" 3.3.4" PrivateAssets =" all" />
2424 <PackageVersion Include =" ShowMeTheXAML.MSBuild" Version =" 2.0.0" />
2525 <PackageVersion Include =" System.CommandLine" Version =" 2.0.0-beta4.22272.1" />
2626 <PackageVersion Include =" System.Net.Http" Version =" 4.3.4" />
27+ <PackageVersion Include =" System.Private.Uri" Version =" 4.3.2" />
2728 <PackageVersion Include =" System.Text.RegularExpressions" Version =" 4.3.1" />
2829 <PackageVersion Include =" VirtualizingWrapPanel" Version =" 1.5.8" />
2930 <PackageVersion Include =" XAMLTest" Version =" 1.3.0-ci602" />
30- <PackageVersion Include =" xunit" Version =" 2.6 .2" />
31- <PackageVersion Include =" xunit.runner.visualstudio " Version =" 2.5.4 " />
32- <PackageVersion Include =" Xunit.StaFact " Version =" 1.1.11 " />
31+ <PackageVersion Include =" xunit.runner.visualstudio " Version =" 3.0 .2" />
32+ <PackageVersion Include =" Xunit.StaFact " Version =" 2.0.36-alpha " />
33+ <PackageVersion Include =" xunit.v3 " Version =" 1.1.0 " />
3334 </ItemGroup >
3435</Project >
Original file line number Diff line number Diff line change 44 <TargetFrameworks >net472;net8.0-windows</TargetFrameworks >
55 <AssemblyTitle >MaterialDesignColors.Wpf.Tests</AssemblyTitle >
66 <Product >MaterialDesignColors.Wpf.Tests</Product >
7+ <OutputType >Exe</OutputType >
78 </PropertyGroup >
89 <ItemGroup Condition =" '$(TargetFramework)'=='net472'" >
910 <Reference Include =" PresentationCore" />
2526 <PrivateAssets >all</PrivateAssets >
2627 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
2728 </PackageReference >
28- <PackageReference Include =" xunit" />
29- <PackageReference Include =" xunit.runner.visualstudio" />
29+ <PackageReference Include =" System.Net.Http" />
30+ <PackageReference Include =" System.Private.Uri" />
31+ <PackageReference Include =" System.Text.RegularExpressions" />
3032 <PackageReference Include =" Shouldly" />
3133 <PackageReference Include =" Microsoft.NET.Test.Sdk" />
34+ <PackageReference Include =" xunit.runner.visualstudio" >
35+ <PrivateAssets >all</PrivateAssets >
36+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
37+ </PackageReference >
38+ <PackageReference Include =" xunit.v3" />
3239 </ItemGroup >
3340</Project >
Original file line number Diff line number Diff line change 11using Shouldly ;
22using Xunit ;
33
4- namespace MaterialDesignColors . Wpf . Fixture ;
4+ namespace MaterialDesignColors . Wpf . Tests ;
55
66public class ResourceProviderFixture
77{
Original file line number Diff line number Diff line change 66 <UseWPF >true</UseWPF >
77 <NoWarn >$(NoWarn);CA1707</NoWarn >
88 <IncludePackageReferencesDuringMarkupCompilation >true</IncludePackageReferencesDuringMarkupCompilation >
9+ <OutputType >Exe</OutputType >
910 <!-- <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>-->
1011 </PropertyGroup >
1112
1920 <PackageReference Include =" System.Net.Http" />
2021 <PackageReference Include =" System.Text.RegularExpressions" />
2122 <PackageReference Include =" XAMLTest" />
22- <PackageReference Include =" xunit" />
2323 <PackageReference Include =" xunit.runner.visualstudio" >
2424 <PrivateAssets >all</PrivateAssets >
2525 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
2626 </PackageReference >
27+ <PackageReference Include =" xunit.v3" />
2728 </ItemGroup >
2829
2930 <ItemGroup >
3031 <Using Include =" MaterialDesignThemes.Wpf" />
3132 <Using Include =" XamlTest" />
3233 <Using Include =" Xunit" />
33- <Using Include =" Xunit.Abstractions" />
3434 </ItemGroup >
3535
3636 <ItemGroup >
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ protected async Task<IVisualElement> LoadUserControl(Type userControlType)
4646 return await App . CreateWindowWithUserControl ( userControlType ) ;
4747 }
4848
49- public async Task InitializeAsync ( ) =>
49+ public async ValueTask InitializeAsync ( ) =>
5050 App = await XamlTest . App . StartRemote ( new AppOptions
5151 {
5252#if ! DEBUG
@@ -55,5 +55,6 @@ public async Task InitializeAsync() =>
5555 AllowVisualStudioDebuggerAttach = AttachedDebuggerToRemoteProcess,
5656 LogMessage = Output . WriteLine
5757 } ) ;
58- public async Task DisposeAsync ( ) => await App . DisposeAsync ( ) ;
58+
59+ public async ValueTask DisposeAsync ( ) => await App . DisposeAsync ( ) ;
5960}
Original file line number Diff line number Diff line change @@ -862,24 +862,24 @@ public async Task TopLevelItemWithNestedExpandedChild_MovesChildrenMaintainingEx
862862 await item1 . LeftClickExpander ( ) ;
863863
864864 //NB: Needs to be long enough delay so the next click does not register as a double click
865- await Task . Delay ( 1000 ) ;
865+ await Task . Delay ( 1000 , TestContext . Current . CancellationToken ) ;
866866
867867 // Add children to item "1_1" and expand
868868 IVisualElement < TreeListViewItem > item11 = await treeListView . GetElement < TreeListViewItem > ( "/TreeListViewItem[3]" ) ;
869869 await AddChildren ( item11 , 3 , addButton ) ;
870870 await item11 . LeftClickExpander ( ) ;
871871
872872 //NB: Needs to be long enough delay so the next click does not register as a double click
873- await Task . Delay ( 1000 ) ;
873+ await Task . Delay ( 1000 , TestContext . Current . CancellationToken ) ;
874874
875875 //Move parent item down
876876 await item1 . LeftClick ( ) ;
877877 await upButton . LeftClick ( ) ;
878878
879- await Task . Delay ( 1000 ) ;
879+ await Task . Delay ( 1000 , TestContext . Current . CancellationToken ) ;
880880
881881 await downButton . LeftClick ( ) ;
882- await Task . Delay ( 1000 ) ;
882+ await Task . Delay ( 1000 , TestContext . Current . CancellationToken ) ;
883883
884884 //Assert the child was successfully moved
885885 await AssertTreeItemContent ( treeListView , 0 , "0" ) ;
Original file line number Diff line number Diff line change 11using System . ComponentModel ;
22using System . Threading ;
33using System . Windows . Threading ;
4- using Xunit ;
54
65namespace MaterialDesignThemes . Wpf . Tests ;
76
Original file line number Diff line number Diff line change 11using System . Reflection ;
22using Xunit . Sdk ;
3+ using Xunit . v3 ;
34
45namespace MaterialDesignThemes . Wpf . Tests ;
56
67public class EnumDataAttribute : DataAttribute
78{
8- public override IEnumerable < object [ ] > GetData ( MethodInfo testMethod )
9+ public override ValueTask < IReadOnlyCollection < ITheoryDataRow > > GetData ( MethodInfo testMethod , DisposalTracker disposalTracker )
910 {
1011 ParameterInfo [ ] parameters = testMethod . GetParameters ( ) ;
1112 if ( parameters . Length != 1 ||
@@ -14,14 +15,15 @@ public override IEnumerable<object[]> GetData(MethodInfo testMethod)
1415 throw new Exception ( $ "{ testMethod . DeclaringType ? . FullName } .{ testMethod . Name } must have a single enum parameter") ;
1516 }
1617
17- return GetDataImplementation ( parameters [ 0 ] . ParameterType ) ;
18+ return new ( [ .. GetDataImplementation ( parameters [ 0 ] . ParameterType ) ] ) ;
1819
19- static IEnumerable < object [ ] > GetDataImplementation ( Type parameterType )
20+ static IEnumerable < ITheoryDataRow > GetDataImplementation ( Type parameterType )
2021 {
2122 foreach ( object enumValue in Enum . GetValues ( parameterType ) . OfType < object > ( ) )
2223 {
23- yield return new [ ] { enumValue } ;
24+ yield return new TheoryDataRow ( enumValue ) ;
2425 }
2526 }
2627 }
28+ public override bool SupportsDiscoveryEnumeration ( ) => true ;
2729}
Original file line number Diff line number Diff line change 44 <TargetFrameworks >net472;net8.0-windows</TargetFrameworks >
55 <AssemblyTitle >MaterialDesignThemes.Wpf.Tests</AssemblyTitle >
66 <Product >MaterialDesignThemes.Wpf.Tests</Product >
7+ <OutputType >Exe</OutputType >
8+ <UseWPF >true</UseWPF >
79 </PropertyGroup >
810 <ItemGroup Condition =" '$(TargetFramework)'=='net472'" >
911 <Reference Include =" PresentationCore" />
2628 <PrivateAssets >all</PrivateAssets >
2729 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
2830 </PackageReference >
29- <PackageReference Include =" xunit" />
30- <PackageReference Include =" xunit.runner.visualstudio" />
31+ <PackageReference Include =" System.Net.Http" />
32+ <PackageReference Include =" System.Text.RegularExpressions" />
33+ <PackageReference Include =" xunit.runner.visualstudio" >
34+ <PrivateAssets >all</PrivateAssets >
35+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
36+ </PackageReference >
37+ <PackageReference Include =" xunit.v3" />
3138 <PackageReference Include =" Xunit.StaFact" />
3239 <PackageReference Include =" Microsoft.NET.Test.Sdk" />
3340 </ItemGroup >
You can’t perform that action at this time.
0 commit comments