From d976f0dd71b790b3891a290f010058263e2ecc29 Mon Sep 17 00:00:00 2001 From: Damian Suess Date: Sat, 31 Aug 2024 18:03:44 -0400 Subject: [PATCH] Disabled ImplicitUsing for Avalonia test project clarity, adding `using` statments to each class --- PrismLibrary.sln | 11 +++++--- .../Prism.Avalonia/Prism.Avalonia.csproj | 5 ++-- .../ListDictionaryFixture.cs | 2 ++ .../Mocks/Modules/MockAttributedModule.cs | 1 + .../Mocks/Modules/MockDependantModule.cs | 1 + .../Mocks/Modules/MockDependencyModule.cs | 1 + .../Mocks/Modules/MockModuleA.cs | 1 + .../Modules/MockModuleReferencingAssembly.cs | 1 + .../MockModuleReferencingOtherModule.cs | 1 + .../Modules/MockModuleThrowingException.cs | 1 + .../Mocks/Views/MockOptOut.cs | 2 +- .../AssemblyResolverFixture.Desktop.cs | 1 + ...nfigurationModuleCatalogFixture.Desktop.cs | 2 ++ .../Modularity/ModuleCatalogFixture.cs | 3 +++ .../ModuleInfoGroupExtensionsFixture.cs | 2 ++ .../Mvvm/ViewModelLocatorFixture.cs | 2 +- .../Prism.Avalonia.Tests.csproj | 5 ++++ .../Regions/AllActiveRegionFixture.cs | 4 ++- ...nContextToAvaloniaObjectBehaviorFixture.cs | 3 ++- .../ClearChildViewsRegionBehaviorFixture.cs | 1 + .../DelayedRegionCreationBehaviorFixture.cs | 25 +++++++++++-------- ...yncRegionContextWithHostBehaviorFixture.cs | 4 ++- .../NavigationAsyncExtensionsFixture.cs | 5 +++- .../Regions/NavigationContextFixture.cs | 4 ++- .../Regions/RegionAdapterMappingsFixture.cs | 4 ++- .../RegionBehaviorCollectionFixture.cs | 1 + .../Regions/RegionBehaviorFactoryFixture.cs | 3 +++ .../Regions/RegionNavigationJournalFixture.cs | 5 +++- .../RegionNavigationServiceFixture.new.cs | 5 ++-- .../Regions/RegionViewRegistryFixture.cs | 4 +-- .../Regions/SingleActiveRegionFixture.cs | 3 ++- .../Regions/ViewsCollectionFixture.cs | 4 ++- 32 files changed, 85 insertions(+), 32 deletions(-) diff --git a/PrismLibrary.sln b/PrismLibrary.sln index e713a8d6a..5b2cc2f30 100644 --- a/PrismLibrary.sln +++ b/PrismLibrary.sln @@ -84,6 +84,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.DryIoc.Avalonia.Tests EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.IocContainer.Avalonia.Tests.Support", "tests\Avalonia\Prism.IocContainer.Avalonia.Tests.Support\Prism.IocContainer.Avalonia.Tests.Support.csproj", "{887E0794-798D-4127-847E-6F68D5C9B334}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Avalonia", "Avalonia", "{904D5094-55F9-4581-90AC-D6C1131F8152}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -402,10 +404,11 @@ Global {8AE1015F-4D62-47EF-A576-2F7411EC20D5} = {F3664D7A-6FF5-4D1F-9F5F-26EE87F032D3} {C505C63F-99E6-464F-8C83-1AE4239C19B1} = {8AE1015F-4D62-47EF-A576-2F7411EC20D5} {A6B7B19C-3288-4CD2-A737-527BEB1ED807} = {8AE1015F-4D62-47EF-A576-2F7411EC20D5} - {AB501F63-8E8C-4333-8A15-81BA02F3C703} = {00FFDC13-7397-46F1-897E-A62A7575D28A} - {6FDA7D49-DF44-4E8F-A182-0EB73DD3C452} = {00FFDC13-7397-46F1-897E-A62A7575D28A} - {03B9C775-9582-409F-B67F-6B8A0CE0C7AF} = {00FFDC13-7397-46F1-897E-A62A7575D28A} - {887E0794-798D-4127-847E-6F68D5C9B334} = {00FFDC13-7397-46F1-897E-A62A7575D28A} + {AB501F63-8E8C-4333-8A15-81BA02F3C703} = {904D5094-55F9-4581-90AC-D6C1131F8152} + {6FDA7D49-DF44-4E8F-A182-0EB73DD3C452} = {904D5094-55F9-4581-90AC-D6C1131F8152} + {03B9C775-9582-409F-B67F-6B8A0CE0C7AF} = {904D5094-55F9-4581-90AC-D6C1131F8152} + {887E0794-798D-4127-847E-6F68D5C9B334} = {904D5094-55F9-4581-90AC-D6C1131F8152} + {904D5094-55F9-4581-90AC-D6C1131F8152} = {00FFDC13-7397-46F1-897E-A62A7575D28A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C7433AE2-B1A0-4C1A-887E-5CAA7AAF67A6} diff --git a/src/Avalonia/Prism.Avalonia/Prism.Avalonia.csproj b/src/Avalonia/Prism.Avalonia/Prism.Avalonia.csproj index 33edf0a00..edf13bb8e 100644 --- a/src/Avalonia/Prism.Avalonia/Prism.Avalonia.csproj +++ b/src/Avalonia/Prism.Avalonia/Prism.Avalonia.csproj @@ -17,7 +17,6 @@ Prism.Avalonia helps you more easily design and build rich, flexible, and easy t - @@ -31,11 +30,13 @@ Prism.Avalonia helps you more easily design and build rich, flexible, and easy t + + < ! - - We probably don't want to support this in Avalonia projects keeping for now - - > + --> diff --git a/tests/Avalonia/Prism.Avalonia.Tests/ListDictionaryFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/ListDictionaryFixture.cs index af44c3843..e882d50cb 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/ListDictionaryFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/ListDictionaryFixture.cs @@ -1,3 +1,5 @@ +using System; +using System.Collections.Generic; using Prism.Common; using Xunit; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockAttributedModule.cs b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockAttributedModule.cs index 430e2e7cb..ab18f8239 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockAttributedModule.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockAttributedModule.cs @@ -1,3 +1,4 @@ +using System; using Prism.Ioc; using Prism.Modularity; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockDependantModule.cs b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockDependantModule.cs index 8222ed91f..ac16e3a5f 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockDependantModule.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockDependantModule.cs @@ -1,3 +1,4 @@ +using System; using Prism.Ioc; using Prism.Modularity; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockDependencyModule.cs b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockDependencyModule.cs index f7d2eb3d0..3c536acd5 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockDependencyModule.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockDependencyModule.cs @@ -1,3 +1,4 @@ +using System; using Prism.Ioc; using Prism.Modularity; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleA.cs b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleA.cs index 8f32bfb03..11ec67046 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleA.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleA.cs @@ -1,3 +1,4 @@ +using System; using Prism.Ioc; using Prism.Modularity; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleReferencingAssembly.cs b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleReferencingAssembly.cs index 5cce67a0b..9bead5751 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleReferencingAssembly.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleReferencingAssembly.cs @@ -1,3 +1,4 @@ +using System; using Prism.Ioc; using Prism.Modularity; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleReferencingOtherModule.cs b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleReferencingOtherModule.cs index 5df9904df..5ef455381 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleReferencingOtherModule.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleReferencingOtherModule.cs @@ -1,3 +1,4 @@ +using System; using Prism.Ioc; using Prism.Modularity; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleThrowingException.cs b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleThrowingException.cs index ccf198977..acc369530 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleThrowingException.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Modules/MockModuleThrowingException.cs @@ -1,3 +1,4 @@ +using System; using Prism.Ioc; using Prism.Modularity; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Views/MockOptOut.cs b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Views/MockOptOut.cs index b03cfb17f..e9167d6bd 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Views/MockOptOut.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Mocks/Views/MockOptOut.cs @@ -1,4 +1,4 @@ -using Avalonia.Controls; +using Avalonia.Controls; using Prism.Mvvm; namespace Prism.Avalonia.Tests.Mocks.Views diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Modularity/AssemblyResolverFixture.Desktop.cs b/tests/Avalonia/Prism.Avalonia.Tests/Modularity/AssemblyResolverFixture.Desktop.cs index 905caa391..e103d31eb 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Modularity/AssemblyResolverFixture.Desktop.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Modularity/AssemblyResolverFixture.Desktop.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using Prism.Modularity; using Xunit; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ConfigurationModuleCatalogFixture.Desktop.cs b/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ConfigurationModuleCatalogFixture.Desktop.cs index 22ef329b0..31552e5fe 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ConfigurationModuleCatalogFixture.Desktop.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ConfigurationModuleCatalogFixture.Desktop.cs @@ -1,4 +1,6 @@ +using System; using System.Configuration; +using System.Linq; using Prism.Avalonia.Tests.Mocks; using Prism.Modularity; using Xunit; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ModuleCatalogFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ModuleCatalogFixture.cs index c42034e5a..31486adf3 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ModuleCatalogFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ModuleCatalogFixture.cs @@ -1,4 +1,7 @@ +using System; +using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Linq; using Prism.Modularity; using Xunit; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ModuleInfoGroupExtensionsFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ModuleInfoGroupExtensionsFixture.cs index 527863d6f..fafce4677 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ModuleInfoGroupExtensionsFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Modularity/ModuleInfoGroupExtensionsFixture.cs @@ -1,3 +1,5 @@ +using System; +using System.Linq; using Prism.Ioc; using Prism.Modularity; using Xunit; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Mvvm/ViewModelLocatorFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Mvvm/ViewModelLocatorFixture.cs index 5c5bff60c..4e16b9c85 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Mvvm/ViewModelLocatorFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Mvvm/ViewModelLocatorFixture.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Reflection; using Prism.Mvvm; using Prism.Avalonia.Tests.Mocks.ViewModels; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Prism.Avalonia.Tests.csproj b/tests/Avalonia/Prism.Avalonia.Tests/Prism.Avalonia.Tests.csproj index 16f088572..aedc80c06 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Prism.Avalonia.Tests.csproj +++ b/tests/Avalonia/Prism.Avalonia.Tests/Prism.Avalonia.Tests.csproj @@ -31,6 +31,11 @@ + + + + + MSBuild:Compile diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/AllActiveRegionFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/AllActiveRegionFixture.cs index 5a6a72022..92a475a58 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/AllActiveRegionFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/AllActiveRegionFixture.cs @@ -1,4 +1,6 @@ -using Xunit; +using System; +using Prism.Navigation.Regions; +using Xunit; namespace Prism.Avalonia.Tests.Regions { diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/BindRegionContextToAvaloniaObjectBehaviorFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/BindRegionContextToAvaloniaObjectBehaviorFixture.cs index f37884560..d61aa88af 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/BindRegionContextToAvaloniaObjectBehaviorFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/BindRegionContextToAvaloniaObjectBehaviorFixture.cs @@ -1,4 +1,5 @@ -using Prism.Avalonia.Tests.Mocks; +using Prism.Avalonia.Tests.Mocks; +using Prism.Navigation.Regions; using Prism.Navigation.Regions.Behaviors; using Xunit; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/ClearChildViewsRegionBehaviorFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/ClearChildViewsRegionBehaviorFixture.cs index 644ffe113..ab7fa9f50 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/ClearChildViewsRegionBehaviorFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/ClearChildViewsRegionBehaviorFixture.cs @@ -1,3 +1,4 @@ +using Prism.Navigation.Regions; using Prism.Avalonia.Tests.Mocks; using Prism.Navigation.Regions.Behaviors; using Xunit; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/DelayedRegionCreationBehaviorFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/DelayedRegionCreationBehaviorFixture.cs index 6843656eb..41a6214ff 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/DelayedRegionCreationBehaviorFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/DelayedRegionCreationBehaviorFixture.cs @@ -1,5 +1,8 @@ -using Avalonia; +using System; +using System.Linq; +using Avalonia; using Prism.Avalonia.Tests.Mocks; +using Prism.Navigation.Regions; using Prism.Navigation.Regions.Behaviors; using Xunit; @@ -36,8 +39,8 @@ public void RegionWillNotGetCreatedTwiceWhenThereAreMoreRegions() var adapter = new MockRegionAdapter(); adapter.Accessor = accessor; - var behavior1 = this.GetBehavior(control1, accessor, adapter); - var behavior2 = this.GetBehavior(control2, accessor, adapter); + var behavior1 = GetBehavior(control1, accessor, adapter); + var behavior2 = GetBehavior(control2, accessor, adapter); behavior1.Attach(); behavior2.Attach(); @@ -60,9 +63,9 @@ public void RegionGetsCreatedWhenAccessingRegions() GetRegionName = d => "myRegionName" }; - var behavior1 = this.GetBehavior(control1, accessor); + var behavior1 = GetBehavior(control1, accessor); behavior1.Attach(); - var behavior2 = this.GetBehavior(control2, accessor); + var behavior2 = GetBehavior(control2, accessor); behavior2.Attach(); accessor.UpdateRegions(); @@ -83,7 +86,7 @@ public void RegionDoesNotGetCreatedTwiceWhenUpdatingRegions() GetRegionName = d => "myRegionName" }; - var behavior = this.GetBehavior(control, accessor); + var behavior = GetBehavior(control, accessor); behavior.Attach(); accessor.UpdateRegions(); IRegion region = RegionManager.GetObservableRegion(control).Value; @@ -104,7 +107,7 @@ public void BehaviorDoesNotPreventControlFromBeingGarbageCollected() GetRegionName = d => "myRegionName" }; - var behavior = this.GetBehavior(control, accessor); + var behavior = GetBehavior(control, accessor); behavior.Attach(); Assert.True(controlWeakReference.IsAlive); @@ -127,7 +130,7 @@ public void BehaviorDoesNotPreventControlFromBeingGarbageCollectedWhenRegionWasC GetRegionName = d => "myRegionName" }; - var behavior = this.GetBehavior(control, accessor); + var behavior = GetBehavior(control, accessor); behavior.Attach(); accessor.UpdateRegions(); @@ -149,7 +152,7 @@ public void BehaviorShouldUnhookEventWhenDetaching() { GetRegionName = d => "myRegionName", }; - var behavior = this.GetBehavior(control, accessor); + var behavior = GetBehavior(control, accessor); behavior.Attach(); int startingCount = accessor.GetSubscribersCount(); @@ -170,7 +173,7 @@ public void ShouldCleanupBehaviorOnceRegionIsCreated() GetRegionName = d => "myRegionName" }; - var behavior = this.GetBehavior(control, accessor); + var behavior = GetBehavior(control, accessor); WeakReference behaviorWeakReference = new WeakReference(behavior); behavior.Attach(); accessor.UpdateRegions(); @@ -182,7 +185,7 @@ public void ShouldCleanupBehaviorOnceRegionIsCreated() Assert.False(behaviorWeakReference.IsAlive); - var behavior2 = this.GetBehavior(control2, accessor); + var behavior2 = GetBehavior(control2, accessor); WeakReference behaviorWeakReference2 = new WeakReference(behavior2); behavior2.Attach(); accessor.UpdateRegions(); diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/SyncRegionContextWithHostBehaviorFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/SyncRegionContextWithHostBehaviorFixture.cs index 0fac0d1af..006c6a304 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/SyncRegionContextWithHostBehaviorFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/Behaviors/SyncRegionContextWithHostBehaviorFixture.cs @@ -1,6 +1,8 @@ -using Avalonia; +using System; +using Avalonia; using Prism.Avalonia.Tests.Mocks; using Prism.Common; +using Prism.Navigation.Regions; using Prism.Navigation.Regions.Behaviors; using Xunit; diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/NavigationAsyncExtensionsFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/NavigationAsyncExtensionsFixture.cs index ca769c28c..74a6a374f 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/NavigationAsyncExtensionsFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/NavigationAsyncExtensionsFixture.cs @@ -1,4 +1,7 @@ -using Moq; +using System; +using Moq; +using Prism.Navigation; +using Prism.Navigation.Regions; using Xunit; namespace Prism.Avalonia.Tests.Regions diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/NavigationContextFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/NavigationContextFixture.cs index 30122cdcb..ba68fe1a1 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/NavigationContextFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/NavigationContextFixture.cs @@ -1,4 +1,6 @@ -using Moq; +using System; +using Moq; +using Prism.Navigation.Regions; using Xunit; namespace Prism.Avalonia.Tests.Regions diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionAdapterMappingsFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionAdapterMappingsFixture.cs index b6a8d3585..30f433ecd 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionAdapterMappingsFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionAdapterMappingsFixture.cs @@ -1,9 +1,11 @@ -using Prism.Navigation.Regions; +using Prism.Navigation.Regions; using Prism.Avalonia.Tests.Mocks; using Avalonia.Controls; using Moq; using Prism.Ioc; using Xunit; +using System; +using System.Collections.Generic; namespace Prism.Avalonia.Tests.Regions { diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionBehaviorCollectionFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionBehaviorCollectionFixture.cs index c6faeebf5..0e6620159 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionBehaviorCollectionFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionBehaviorCollectionFixture.cs @@ -1,4 +1,5 @@ using Prism.Avalonia.Tests.Mocks; +using Prism.Navigation.Regions; using Xunit; namespace Prism.Avalonia.Tests.Regions diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionBehaviorFactoryFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionBehaviorFactoryFixture.cs index 725855a10..9f49b53db 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionBehaviorFactoryFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionBehaviorFactoryFixture.cs @@ -2,6 +2,9 @@ using Moq; using Prism.Ioc; using Xunit; +using Prism.Navigation.Regions; +using System.Linq; +using System; namespace Prism.Avalonia.Tests.Regions { diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionNavigationJournalFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionNavigationJournalFixture.cs index 1217da833..bd2f2e08f 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionNavigationJournalFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionNavigationJournalFixture.cs @@ -1,4 +1,7 @@ -using Moq; +using System; +using Moq; +using Prism.Navigation; +using Prism.Navigation.Regions; using Xunit; namespace Prism.Avalonia.Tests.Regions diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionNavigationServiceFixture.new.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionNavigationServiceFixture.new.cs index 243a8429a..3598fef35 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionNavigationServiceFixture.new.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionNavigationServiceFixture.new.cs @@ -1,10 +1,11 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; -using System.Windows; using Avalonia.Controls; using Moq; using Prism.Ioc; +using Prism.Navigation; +using Prism.Navigation.Regions; using Xunit; namespace Prism.Avalonia.Tests.Regions { diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionViewRegistryFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionViewRegistryFixture.cs index 8acf83500..e3e9aa16e 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionViewRegistryFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/RegionViewRegistryFixture.cs @@ -116,7 +116,7 @@ public void OnRegisterErrorShouldSkipFrameworkExceptions() Assert.Contains("R1", ex.Message); } - [StaFact] + [StaFact(DisplayName = "Flaky test, runs alone but not in a group")] public void RegisterViewWithRegion_ShouldHaveViewModel_ByDefault() { ViewModelLocatorFixture.ResetViewModelLocationProvider(); @@ -139,7 +139,7 @@ public void RegisterViewWithRegion_ShouldHaveViewModel_ByDefault() Assert.IsType(view.DataContext); } - [StaFact] + [StaFact(DisplayName = "Flaky test, runs alone but not in a group")] public void RegisterViewWithRegion_ShouldNotHaveViewModel_OnOptOut() { ViewModelLocatorFixture.ResetViewModelLocationProvider(); diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/SingleActiveRegionFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/SingleActiveRegionFixture.cs index 2df281797..0436fef4b 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/SingleActiveRegionFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/SingleActiveRegionFixture.cs @@ -1,5 +1,6 @@ -using Moq; +using Moq; using Prism.Ioc; +using Prism.Navigation.Regions; using Xunit; namespace Prism.Avalonia.Tests.Regions diff --git a/tests/Avalonia/Prism.Avalonia.Tests/Regions/ViewsCollectionFixture.cs b/tests/Avalonia/Prism.Avalonia.Tests/Regions/ViewsCollectionFixture.cs index ea3c51df7..217e639a5 100644 --- a/tests/Avalonia/Prism.Avalonia.Tests/Regions/ViewsCollectionFixture.cs +++ b/tests/Avalonia/Prism.Avalonia.Tests/Regions/ViewsCollectionFixture.cs @@ -1,4 +1,4 @@ -// NOTE: +// NOTE: // Avalonia.Data.CollectionViewSource control does not exist in Avalonia. // This feature was apart of a legacy build: // https://github.com/grokys/Avalonia/blob/master/Avalonia/Data/CollectionViewSource.cs @@ -7,7 +7,9 @@ using System.Collections; using System.Collections.ObjectModel; using System.Collections.Specialized; +using System.Linq; using Prism.Avalonia.Tests.Mocks; +using Prism.Navigation.Regions; using Xunit; namespace Prism.Avalonia.Tests.Regions