From ea83fd565ae5a2be77e0c2be9e45aafec0a2d64a Mon Sep 17 00:00:00 2001 From: JT Date: Fri, 14 Jun 2024 21:24:40 +0800 Subject: [PATCH] Further adjustments to test projects --- src/CoreTests/CoreTests.csproj | 2 +- src/DaemonTests/DaemonTests.csproj | 6 ++--- src/DocumentDbTests/DocumentDbTests.csproj | 4 ++-- .../EventSourcingTests.csproj | 6 ++--- src/LinqTests/LinqTests.csproj | 4 ++-- .../Marten.CommandLine.Tests.csproj | 6 ++--- .../Marten.NodaTime.Testing.csproj | 6 ++--- .../Marten.PLv8.Testing.csproj | 6 ++--- src/Marten.Testing/Marten.Testing.csproj | 6 ++--- src/Marten.sln | 12 +++++----- .../MultiTenancyTests.csproj | 6 ++--- src/PatchingTests/PatchingTests.csproj | 6 ++--- .../DocSamples.csproj} | 22 ++++++++++++------- .../EventSourcingQuickstart.cs | 7 +++--- src/samples/DocSamples/GlobalUsings.cs | 1 + .../Helpdesk.Api.Tests.csproj | 6 ++--- 16 files changed, 56 insertions(+), 50 deletions(-) rename src/samples/{DocsSamples/DocsSamples.csproj => DocSamples/DocSamples.csproj} (53%) rename src/samples/{DocsSamples => DocSamples}/EventSourcingQuickstart.cs (99%) create mode 100644 src/samples/DocSamples/GlobalUsings.cs diff --git a/src/CoreTests/CoreTests.csproj b/src/CoreTests/CoreTests.csproj index 5d85ef864a..34e4f701ec 100644 --- a/src/CoreTests/CoreTests.csproj +++ b/src/CoreTests/CoreTests.csproj @@ -23,7 +23,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/src/DaemonTests/DaemonTests.csproj b/src/DaemonTests/DaemonTests.csproj index 3a9cc1e62c..50a258ef4a 100644 --- a/src/DaemonTests/DaemonTests.csproj +++ b/src/DaemonTests/DaemonTests.csproj @@ -12,12 +12,12 @@ - - + + all runtime; build; native; contentfiles; analyzers - + diff --git a/src/DocumentDbTests/DocumentDbTests.csproj b/src/DocumentDbTests/DocumentDbTests.csproj index 43cfa21ae4..7a0972871e 100644 --- a/src/DocumentDbTests/DocumentDbTests.csproj +++ b/src/DocumentDbTests/DocumentDbTests.csproj @@ -21,11 +21,11 @@ - + all runtime; build; native; contentfiles; analyzers - + diff --git a/src/EventSourcingTests/EventSourcingTests.csproj b/src/EventSourcingTests/EventSourcingTests.csproj index 36173ca987..d94285e8d0 100644 --- a/src/EventSourcingTests/EventSourcingTests.csproj +++ b/src/EventSourcingTests/EventSourcingTests.csproj @@ -18,12 +18,12 @@ - - + + all runtime; build; native; contentfiles; analyzers - + diff --git a/src/LinqTests/LinqTests.csproj b/src/LinqTests/LinqTests.csproj index eb5f6b9760..d7b5357e5b 100644 --- a/src/LinqTests/LinqTests.csproj +++ b/src/LinqTests/LinqTests.csproj @@ -16,11 +16,11 @@ - + all runtime; build; native; contentfiles; analyzers - + diff --git a/src/Marten.CommandLine.Tests/Marten.CommandLine.Tests.csproj b/src/Marten.CommandLine.Tests/Marten.CommandLine.Tests.csproj index 509e6ec9d4..065abe2855 100644 --- a/src/Marten.CommandLine.Tests/Marten.CommandLine.Tests.csproj +++ b/src/Marten.CommandLine.Tests/Marten.CommandLine.Tests.csproj @@ -8,11 +8,11 @@ - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Marten.NodaTime.Testing/Marten.NodaTime.Testing.csproj b/src/Marten.NodaTime.Testing/Marten.NodaTime.Testing.csproj index d31769c7ab..3b155abfd9 100644 --- a/src/Marten.NodaTime.Testing/Marten.NodaTime.Testing.csproj +++ b/src/Marten.NodaTime.Testing/Marten.NodaTime.Testing.csproj @@ -12,12 +12,12 @@ - - + + all runtime; build; native; contentfiles; analyzers - + xUnit1013 diff --git a/src/Marten.PLv8.Testing/Marten.PLv8.Testing.csproj b/src/Marten.PLv8.Testing/Marten.PLv8.Testing.csproj index 62f404f25b..ceac29660e 100644 --- a/src/Marten.PLv8.Testing/Marten.PLv8.Testing.csproj +++ b/src/Marten.PLv8.Testing/Marten.PLv8.Testing.csproj @@ -7,9 +7,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Marten.Testing/Marten.Testing.csproj b/src/Marten.Testing/Marten.Testing.csproj index 2cd44c0514..29122173b4 100644 --- a/src/Marten.Testing/Marten.Testing.csproj +++ b/src/Marten.Testing/Marten.Testing.csproj @@ -25,12 +25,12 @@ - - + + all runtime; build; native; contentfiles; analyzers - + diff --git a/src/Marten.sln b/src/Marten.sln index 10c05409b5..d2ffc38d0d 100644 --- a/src/Marten.sln +++ b/src/Marten.sln @@ -106,7 +106,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OData", "OData", "{93FC8079 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNetODataWithMarten", "AspNetODataWithMarten\AspNetODataWithMarten.csproj", "{93298A4C-2B88-4EF3-9FC8-6B2AEF52F628}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocsSamples", "samples\DocsSamples\DocsSamples.csproj", "{4B8AF0ED-590B-44B7-93BE-6182FE88C719}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocSamples", "samples\DocSamples\DocSamples.csproj", "{364A165E-965E-4AFD-92AC-8447FB114C60}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -254,10 +254,10 @@ Global {93298A4C-2B88-4EF3-9FC8-6B2AEF52F628}.Debug|Any CPU.Build.0 = Debug|Any CPU {93298A4C-2B88-4EF3-9FC8-6B2AEF52F628}.Release|Any CPU.ActiveCfg = Release|Any CPU {93298A4C-2B88-4EF3-9FC8-6B2AEF52F628}.Release|Any CPU.Build.0 = Release|Any CPU - {4B8AF0ED-590B-44B7-93BE-6182FE88C719}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4B8AF0ED-590B-44B7-93BE-6182FE88C719}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4B8AF0ED-590B-44B7-93BE-6182FE88C719}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4B8AF0ED-590B-44B7-93BE-6182FE88C719}.Release|Any CPU.Build.0 = Release|Any CPU + {364A165E-965E-4AFD-92AC-8447FB114C60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {364A165E-965E-4AFD-92AC-8447FB114C60}.Debug|Any CPU.Build.0 = Debug|Any CPU + {364A165E-965E-4AFD-92AC-8447FB114C60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {364A165E-965E-4AFD-92AC-8447FB114C60}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -297,7 +297,7 @@ Global {00DBDB5E-FE7B-4886-A989-181331DDD148} = {79961196-DB50-4AD3-B749-D231799BCF2E} {93FC8079-48C4-4D3B-8C17-3944A903674F} = {79961196-DB50-4AD3-B749-D231799BCF2E} {93298A4C-2B88-4EF3-9FC8-6B2AEF52F628} = {93FC8079-48C4-4D3B-8C17-3944A903674F} - {4B8AF0ED-590B-44B7-93BE-6182FE88C719} = {79961196-DB50-4AD3-B749-D231799BCF2E} + {364A165E-965E-4AFD-92AC-8447FB114C60} = {79961196-DB50-4AD3-B749-D231799BCF2E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {52B7158F-0A24-47D9-9CF7-3FA94170041A} diff --git a/src/MultiTenancyTests/MultiTenancyTests.csproj b/src/MultiTenancyTests/MultiTenancyTests.csproj index e2fa3d5879..64c6e21ffc 100644 --- a/src/MultiTenancyTests/MultiTenancyTests.csproj +++ b/src/MultiTenancyTests/MultiTenancyTests.csproj @@ -17,10 +17,10 @@ - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/PatchingTests/PatchingTests.csproj b/src/PatchingTests/PatchingTests.csproj index 5c765c1652..349cfcddfa 100644 --- a/src/PatchingTests/PatchingTests.csproj +++ b/src/PatchingTests/PatchingTests.csproj @@ -7,9 +7,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/samples/DocsSamples/DocsSamples.csproj b/src/samples/DocSamples/DocSamples.csproj similarity index 53% rename from src/samples/DocsSamples/DocsSamples.csproj rename to src/samples/DocSamples/DocSamples.csproj index 37b9bb1cad..5fb9d32bce 100644 --- a/src/samples/DocsSamples/DocsSamples.csproj +++ b/src/samples/DocSamples/DocSamples.csproj @@ -1,23 +1,29 @@ - + net8.0 enable enable + false + true - - - - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - runtime; build; native; contentfiles; analyzers + + + + diff --git a/src/samples/DocsSamples/EventSourcingQuickstart.cs b/src/samples/DocSamples/EventSourcingQuickstart.cs similarity index 99% rename from src/samples/DocsSamples/EventSourcingQuickstart.cs rename to src/samples/DocSamples/EventSourcingQuickstart.cs index d8ebc607ec..72e3823672 100644 --- a/src/samples/DocsSamples/EventSourcingQuickstart.cs +++ b/src/samples/DocSamples/EventSourcingQuickstart.cs @@ -3,9 +3,7 @@ using Marten.Events.Projections; using Marten.Testing.Harness; -namespace Docs.Samples; - - +namespace DocSamples; #region sample_sample-events @@ -86,6 +84,7 @@ public static Quest Apply(QuestEnded ended, Quest party) => public class EventSourcingQuickstart { + [Fact] public async Task capture_events() { #region sample_event-store-quickstart @@ -131,7 +130,7 @@ public async Task capture_events() #endregion } - + [Fact] public async Task quest_projection() { #region sample_adding-quest-projection diff --git a/src/samples/DocSamples/GlobalUsings.cs b/src/samples/DocSamples/GlobalUsings.cs new file mode 100644 index 0000000000..c802f4480b --- /dev/null +++ b/src/samples/DocSamples/GlobalUsings.cs @@ -0,0 +1 @@ +global using Xunit; diff --git a/src/samples/Helpdesk/Helpdesk.Api.Tests/Helpdesk.Api.Tests.csproj b/src/samples/Helpdesk/Helpdesk.Api.Tests/Helpdesk.Api.Tests.csproj index 9abfcbcf72..2e98d01ef9 100644 --- a/src/samples/Helpdesk/Helpdesk.Api.Tests/Helpdesk.Api.Tests.csproj +++ b/src/samples/Helpdesk/Helpdesk.Api.Tests/Helpdesk.Api.Tests.csproj @@ -10,13 +10,13 @@ - + - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive