From 30ae9123c8a5e1d2125955bb63944d2c9899905d Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Fri, 27 Sep 2024 00:48:21 +0000 Subject: [PATCH] Fixes to how the conditional tests work --- Directory.Build.targets | 7 +++++++ Directory.Packages.props | 3 ++- .../Aspire.CommunityToolkit.Testing.csproj | 10 ++++++++++ .../XUnit/ConditionalFactAttribute.cs | 2 +- .../XUnit/ConditionalTheoryAttribute.cs | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 Directory.Build.targets diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 00000000..96ce250d --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,7 @@ + + + + trx%3BLogFileName=$(AssemblyName)-$(TargetFramework).trx + + + \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props index 4b09baf6..2ec36416 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -26,8 +26,9 @@ - + + diff --git a/tests/Aspire.CommunityToolkit.Testing/Aspire.CommunityToolkit.Testing.csproj b/tests/Aspire.CommunityToolkit.Testing/Aspire.CommunityToolkit.Testing.csproj index fa71b7ae..fe37e302 100644 --- a/tests/Aspire.CommunityToolkit.Testing/Aspire.CommunityToolkit.Testing.csproj +++ b/tests/Aspire.CommunityToolkit.Testing/Aspire.CommunityToolkit.Testing.csproj @@ -6,4 +6,14 @@ enable + + + + diff --git a/tests/Aspire.CommunityToolkit.Testing/XUnit/ConditionalFactAttribute.cs b/tests/Aspire.CommunityToolkit.Testing/XUnit/ConditionalFactAttribute.cs index 92077e27..4b5edce3 100644 --- a/tests/Aspire.CommunityToolkit.Testing/XUnit/ConditionalFactAttribute.cs +++ b/tests/Aspire.CommunityToolkit.Testing/XUnit/ConditionalFactAttribute.cs @@ -10,7 +10,7 @@ namespace Microsoft.TestUtilities; [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] -[XunitTestCaseDiscoverer("Microsoft.TestUtilities." + nameof(ConditionalFactDiscoverer), "Microsoft.TestUtilities")] +[XunitTestCaseDiscoverer("Microsoft.TestUtilities." + nameof(ConditionalFactDiscoverer), "Aspire.CommunityToolkit.Testing")] public class ConditionalFactAttribute : FactAttribute { } diff --git a/tests/Aspire.CommunityToolkit.Testing/XUnit/ConditionalTheoryAttribute.cs b/tests/Aspire.CommunityToolkit.Testing/XUnit/ConditionalTheoryAttribute.cs index d5f23068..95401a92 100644 --- a/tests/Aspire.CommunityToolkit.Testing/XUnit/ConditionalTheoryAttribute.cs +++ b/tests/Aspire.CommunityToolkit.Testing/XUnit/ConditionalTheoryAttribute.cs @@ -10,7 +10,7 @@ namespace Microsoft.TestUtilities; [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] -[XunitTestCaseDiscoverer("Microsoft.TestUtilities." + nameof(ConditionalTheoryDiscoverer), "Microsoft.TestUtilities")] +[XunitTestCaseDiscoverer("Microsoft.TestUtilities." + nameof(ConditionalTheoryDiscoverer), "Aspire.CommunityToolkit.Testing")] public class ConditionalTheoryAttribute : TheoryAttribute { }