From 4e924222119a174ecd74f401846174a55c752944 Mon Sep 17 00:00:00 2001
From: Martijn Laarman
Date: Mon, 10 Feb 2025 20:00:40 +0100
Subject: [PATCH 1/4] [Do not merge] testing test reporting of new test project
---
tests/authoring/Blocks/Lists.fs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/authoring/Blocks/Lists.fs b/tests/authoring/Blocks/Lists.fs
index fbb73b663..d0397d3c6 100644
--- a/tests/authoring/Blocks/Lists.fs
+++ b/tests/authoring/Blocks/Lists.fs
@@ -21,7 +21,7 @@ type ``supports loose lists`` () =
You pay for the actual product used, regardless of the application or use case. This is different from subscription-based billing models where customers pay a flat fee restricted by usage quotas, or one-time upfront payment billing models such as those used for on-prem software licenses.
You can purchase credits for a single or multi-year contract. Consumption is on demand, and every month we deduct from your balance based on your usage and contract terms. This allows you to seamlessly expand your usage to the full extent of your requirements and available budget, without any quotas or restrictions.
From 8db4d548e970ca519fba840fbb4810b3ee702dc6 Mon Sep 17 00:00:00 2001
From: Martijn Laarman
Date: Mon, 10 Feb 2025 20:15:25 +0100
Subject: [PATCH 2/4] ensure dotnet test picks up authoring.fsproj
---
tests/authoring/authoring.fsproj | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/authoring/authoring.fsproj b/tests/authoring/authoring.fsproj
index 8f6afc9f5..db3aa38ff 100644
--- a/tests/authoring/authoring.fsproj
+++ b/tests/authoring/authoring.fsproj
@@ -4,6 +4,9 @@
net9.0
false
false
+
+ true
+ true
From c7f5f9cce724e93cdb2d95eea0dd8843a3fb1d82 Mon Sep 17 00:00:00 2001
From: Martijn Laarman
Date: Mon, 10 Feb 2025 21:29:50 +0100
Subject: [PATCH 3/4] move all tests to xunit 3
---
.../CodeBlocks/CallOutTests.cs | 1 -
.../CodeBlocks/CodeTests.cs | 1 -
.../Directives/AdmonitionTests.cs | 1 -
.../Directives/AdmonitionUnsupportedTests.cs | 1 -
.../Directives/AppliesBlockTests.cs | 1 -
.../Directives/DirectiveBaseTests.cs | 7 ++-
.../Directives/ImageTests.cs | 1 -
.../Directives/MermaidTests.cs | 1 -
.../Directives/TabTests.cs | 1 -
.../Directives/UnsupportedTests.cs | 1 -
.../Directives/VersionTests.cs | 1 -
.../DocSet/BreadCrumbTests.cs | 1 -
.../DocSet/LinkReferenceTests.cs | 1 -
.../DocSet/NavigationTests.cs | 1 -
.../DocSet/NavigationTestsBase.cs | 5 +-
.../DocSet/NestedTocTests.cs | 1 -
.../Elastic.Markdown.Tests.csproj | 13 +++--
.../FileInclusion/IncludeTests.cs | 1 -
.../FileInclusion/LiteralIncludeTests.cs | 1 -
.../FrontMatter/ProductConstraintTests.cs | 1 -
.../FrontMatter/YamlFrontMatterTests.cs | 1 -
.../Inline/AnchorLinkTests.cs | 1 -
.../Inline/CommentTest.cs | 1 -
.../Inline/DirectiveBlockLinkTests.cs | 1 -
.../Inline/HardBreakTests.cs | 1 -
.../Inline/InlineAnchorTests.cs | 1 -
.../Inline/InlineImageTest.cs | 1 -
.../Inline/InlineLinkTests.cs | 1 -
.../Inline/InlneBaseTests.cs | 11 ++---
.../Inline/SubstitutionTest.cs | 1 -
.../Mover/MoverTests.cs | 7 ++-
.../OutputDirectoryTests.cs | 3 +-
.../SettingsInclusion/IncludeTests.cs | 1 -
.../TestDiagnosticsCollector.cs | 1 -
tests/Elastic.Markdown.Tests/TestLogger.cs | 1 -
tests/authoring/authoring.fsproj | 48 ++++++++++---------
36 files changed, 49 insertions(+), 74 deletions(-)
diff --git a/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs b/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs
index e2779d220..564879e95 100644
--- a/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs
+++ b/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs
@@ -6,7 +6,6 @@
using Elastic.Markdown.Tests.Inline;
using FluentAssertions;
using JetBrains.Annotations;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.CodeBlocks;
diff --git a/tests/Elastic.Markdown.Tests/CodeBlocks/CodeTests.cs b/tests/Elastic.Markdown.Tests/CodeBlocks/CodeTests.cs
index f5f07079e..fb96bcf05 100644
--- a/tests/Elastic.Markdown.Tests/CodeBlocks/CodeTests.cs
+++ b/tests/Elastic.Markdown.Tests/CodeBlocks/CodeTests.cs
@@ -5,7 +5,6 @@
using Elastic.Markdown.Myst.CodeBlocks;
using Elastic.Markdown.Tests.Inline;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.CodeBlocks;
diff --git a/tests/Elastic.Markdown.Tests/Directives/AdmonitionTests.cs b/tests/Elastic.Markdown.Tests/Directives/AdmonitionTests.cs
index 750cd56e3..72a96d544 100644
--- a/tests/Elastic.Markdown.Tests/Directives/AdmonitionTests.cs
+++ b/tests/Elastic.Markdown.Tests/Directives/AdmonitionTests.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information
using Elastic.Markdown.Myst.Directives;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Directives;
diff --git a/tests/Elastic.Markdown.Tests/Directives/AdmonitionUnsupportedTests.cs b/tests/Elastic.Markdown.Tests/Directives/AdmonitionUnsupportedTests.cs
index 77fe64e6a..e8bc03b5d 100644
--- a/tests/Elastic.Markdown.Tests/Directives/AdmonitionUnsupportedTests.cs
+++ b/tests/Elastic.Markdown.Tests/Directives/AdmonitionUnsupportedTests.cs
@@ -4,7 +4,6 @@
using Elastic.Markdown.Myst.Directives;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Directives;
diff --git a/tests/Elastic.Markdown.Tests/Directives/AppliesBlockTests.cs b/tests/Elastic.Markdown.Tests/Directives/AppliesBlockTests.cs
index ef35d4e48..b24729d45 100644
--- a/tests/Elastic.Markdown.Tests/Directives/AppliesBlockTests.cs
+++ b/tests/Elastic.Markdown.Tests/Directives/AppliesBlockTests.cs
@@ -5,7 +5,6 @@
using Elastic.Markdown.Diagnostics;
using Elastic.Markdown.Myst.Directives;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Directives;
diff --git a/tests/Elastic.Markdown.Tests/Directives/DirectiveBaseTests.cs b/tests/Elastic.Markdown.Tests/Directives/DirectiveBaseTests.cs
index 1594cd966..2a040a0e5 100644
--- a/tests/Elastic.Markdown.Tests/Directives/DirectiveBaseTests.cs
+++ b/tests/Elastic.Markdown.Tests/Directives/DirectiveBaseTests.cs
@@ -9,7 +9,6 @@
using JetBrains.Annotations;
using Markdig.Syntax;
using Microsoft.Extensions.Logging;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Directives;
@@ -19,7 +18,7 @@ public abstract class DirectiveTest(ITestOutputHelper output, [Langu
{
protected TDirective? Block { get; private set; }
- public override async Task InitializeAsync()
+ public override async ValueTask InitializeAsync()
{
await base.InitializeAsync();
Block = Document
@@ -82,7 +81,7 @@ protected DirectiveTest(ITestOutputHelper output, [LanguageInjection("markdown")
protected virtual void AddToFileSystem(MockFileSystem fileSystem) { }
- public virtual async Task InitializeAsync()
+ public virtual async ValueTask InitializeAsync()
{
_ = Collector.StartAsync(default);
@@ -98,6 +97,6 @@ public virtual async Task InitializeAsync()
await Collector.StopAsync(default);
}
- public Task DisposeAsync() => Task.CompletedTask;
+ public ValueTask DisposeAsync() => ValueTask.CompletedTask;
}
diff --git a/tests/Elastic.Markdown.Tests/Directives/ImageTests.cs b/tests/Elastic.Markdown.Tests/Directives/ImageTests.cs
index 77e7f5c60..1242e4826 100644
--- a/tests/Elastic.Markdown.Tests/Directives/ImageTests.cs
+++ b/tests/Elastic.Markdown.Tests/Directives/ImageTests.cs
@@ -6,7 +6,6 @@
using Elastic.Markdown.Diagnostics;
using Elastic.Markdown.Myst.Directives;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Directives;
diff --git a/tests/Elastic.Markdown.Tests/Directives/MermaidTests.cs b/tests/Elastic.Markdown.Tests/Directives/MermaidTests.cs
index 3a0f9eff2..2af2d9c79 100644
--- a/tests/Elastic.Markdown.Tests/Directives/MermaidTests.cs
+++ b/tests/Elastic.Markdown.Tests/Directives/MermaidTests.cs
@@ -4,7 +4,6 @@
using Elastic.Markdown.Myst.Directives;
using FluentAssertions;
using Xunit;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Directives;
diff --git a/tests/Elastic.Markdown.Tests/Directives/TabTests.cs b/tests/Elastic.Markdown.Tests/Directives/TabTests.cs
index f31b05f00..c400a8310 100644
--- a/tests/Elastic.Markdown.Tests/Directives/TabTests.cs
+++ b/tests/Elastic.Markdown.Tests/Directives/TabTests.cs
@@ -4,7 +4,6 @@
using Elastic.Markdown.Myst.Directives;
using FluentAssertions;
using Markdig;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Directives;
diff --git a/tests/Elastic.Markdown.Tests/Directives/UnsupportedTests.cs b/tests/Elastic.Markdown.Tests/Directives/UnsupportedTests.cs
index b22011c94..ad8a8ca47 100644
--- a/tests/Elastic.Markdown.Tests/Directives/UnsupportedTests.cs
+++ b/tests/Elastic.Markdown.Tests/Directives/UnsupportedTests.cs
@@ -5,7 +5,6 @@
using Elastic.Markdown.Diagnostics;
using Elastic.Markdown.Myst.Directives;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Directives;
diff --git a/tests/Elastic.Markdown.Tests/Directives/VersionTests.cs b/tests/Elastic.Markdown.Tests/Directives/VersionTests.cs
index ebfbfa19b..e5ba685d4 100644
--- a/tests/Elastic.Markdown.Tests/Directives/VersionTests.cs
+++ b/tests/Elastic.Markdown.Tests/Directives/VersionTests.cs
@@ -6,7 +6,6 @@
using Elastic.Markdown.Myst.Directives;
using FluentAssertions;
using Markdig.Syntax;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Directives;
diff --git a/tests/Elastic.Markdown.Tests/DocSet/BreadCrumbTests.cs b/tests/Elastic.Markdown.Tests/DocSet/BreadCrumbTests.cs
index c6df8e3d4..1316c5d81 100644
--- a/tests/Elastic.Markdown.Tests/DocSet/BreadCrumbTests.cs
+++ b/tests/Elastic.Markdown.Tests/DocSet/BreadCrumbTests.cs
@@ -4,7 +4,6 @@
using Elastic.Markdown.IO;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.DocSet;
diff --git a/tests/Elastic.Markdown.Tests/DocSet/LinkReferenceTests.cs b/tests/Elastic.Markdown.Tests/DocSet/LinkReferenceTests.cs
index 16329df9c..832b6d087 100644
--- a/tests/Elastic.Markdown.Tests/DocSet/LinkReferenceTests.cs
+++ b/tests/Elastic.Markdown.Tests/DocSet/LinkReferenceTests.cs
@@ -6,7 +6,6 @@
using Elastic.Markdown.IO.Discovery;
using Elastic.Markdown.IO.State;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.DocSet;
diff --git a/tests/Elastic.Markdown.Tests/DocSet/NavigationTests.cs b/tests/Elastic.Markdown.Tests/DocSet/NavigationTests.cs
index 1b324aae2..5f103e1b4 100644
--- a/tests/Elastic.Markdown.Tests/DocSet/NavigationTests.cs
+++ b/tests/Elastic.Markdown.Tests/DocSet/NavigationTests.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.DocSet;
diff --git a/tests/Elastic.Markdown.Tests/DocSet/NavigationTestsBase.cs b/tests/Elastic.Markdown.Tests/DocSet/NavigationTestsBase.cs
index f08354e78..9cb5802c0 100644
--- a/tests/Elastic.Markdown.Tests/DocSet/NavigationTestsBase.cs
+++ b/tests/Elastic.Markdown.Tests/DocSet/NavigationTestsBase.cs
@@ -9,7 +9,6 @@
using Elastic.Markdown.IO.Configuration;
using FluentAssertions;
using Microsoft.Extensions.Logging;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.DocSet;
@@ -45,11 +44,11 @@ protected NavigationTestsBase(ITestOutputHelper output)
protected DocumentationGenerator Generator { get; }
protected ConfigurationFile Configuration { get; set; } = default!;
- public async Task InitializeAsync()
+ public async ValueTask InitializeAsync()
{
await Generator.ResolveDirectoryTree(default);
Configuration = Generator.DocumentationSet.Configuration;
}
- public Task DisposeAsync() => Task.CompletedTask;
+ public ValueTask DisposeAsync() => ValueTask.CompletedTask;
}
diff --git a/tests/Elastic.Markdown.Tests/DocSet/NestedTocTests.cs b/tests/Elastic.Markdown.Tests/DocSet/NestedTocTests.cs
index 39210e6bc..d89f5934d 100644
--- a/tests/Elastic.Markdown.Tests/DocSet/NestedTocTests.cs
+++ b/tests/Elastic.Markdown.Tests/DocSet/NestedTocTests.cs
@@ -4,7 +4,6 @@
using Elastic.Markdown.IO;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.DocSet;
diff --git a/tests/Elastic.Markdown.Tests/Elastic.Markdown.Tests.csproj b/tests/Elastic.Markdown.Tests/Elastic.Markdown.Tests.csproj
index 0a2eb3645..2fdb1c039 100644
--- a/tests/Elastic.Markdown.Tests/Elastic.Markdown.Tests.csproj
+++ b/tests/Elastic.Markdown.Tests/Elastic.Markdown.Tests.csproj
@@ -7,17 +7,22 @@
false
true
+ Exe
+
+ false
+ true
+
+
+
+
+
-
-
-
-
diff --git a/tests/Elastic.Markdown.Tests/FileInclusion/IncludeTests.cs b/tests/Elastic.Markdown.Tests/FileInclusion/IncludeTests.cs
index 11794799f..072fd206a 100644
--- a/tests/Elastic.Markdown.Tests/FileInclusion/IncludeTests.cs
+++ b/tests/Elastic.Markdown.Tests/FileInclusion/IncludeTests.cs
@@ -7,7 +7,6 @@
using Elastic.Markdown.Myst.Directives;
using Elastic.Markdown.Tests.Directives;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.FileInclusion;
diff --git a/tests/Elastic.Markdown.Tests/FileInclusion/LiteralIncludeTests.cs b/tests/Elastic.Markdown.Tests/FileInclusion/LiteralIncludeTests.cs
index a852469d6..15de03a14 100644
--- a/tests/Elastic.Markdown.Tests/FileInclusion/LiteralIncludeTests.cs
+++ b/tests/Elastic.Markdown.Tests/FileInclusion/LiteralIncludeTests.cs
@@ -6,7 +6,6 @@
using Elastic.Markdown.Myst.Directives;
using Elastic.Markdown.Tests.Directives;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.FileInclusion;
diff --git a/tests/Elastic.Markdown.Tests/FrontMatter/ProductConstraintTests.cs b/tests/Elastic.Markdown.Tests/FrontMatter/ProductConstraintTests.cs
index 4f84bf0af..e3f04105a 100644
--- a/tests/Elastic.Markdown.Tests/FrontMatter/ProductConstraintTests.cs
+++ b/tests/Elastic.Markdown.Tests/FrontMatter/ProductConstraintTests.cs
@@ -5,7 +5,6 @@
using Elastic.Markdown.Myst.FrontMatter;
using Elastic.Markdown.Tests.Directives;
using FluentAssertions;
-using Xunit.Abstractions;
using static Elastic.Markdown.Myst.FrontMatter.ProductLifecycle;
namespace Elastic.Markdown.Tests.FrontMatter;
diff --git a/tests/Elastic.Markdown.Tests/FrontMatter/YamlFrontMatterTests.cs b/tests/Elastic.Markdown.Tests/FrontMatter/YamlFrontMatterTests.cs
index 35728fa10..86f653dd4 100644
--- a/tests/Elastic.Markdown.Tests/FrontMatter/YamlFrontMatterTests.cs
+++ b/tests/Elastic.Markdown.Tests/FrontMatter/YamlFrontMatterTests.cs
@@ -4,7 +4,6 @@
using Elastic.Markdown.Tests.Directives;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.FrontMatter;
diff --git a/tests/Elastic.Markdown.Tests/Inline/AnchorLinkTests.cs b/tests/Elastic.Markdown.Tests/Inline/AnchorLinkTests.cs
index a070dd9d1..39e1468f6 100644
--- a/tests/Elastic.Markdown.Tests/Inline/AnchorLinkTests.cs
+++ b/tests/Elastic.Markdown.Tests/Inline/AnchorLinkTests.cs
@@ -6,7 +6,6 @@
using FluentAssertions;
using JetBrains.Annotations;
using Markdig.Syntax.Inlines;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Inline;
diff --git a/tests/Elastic.Markdown.Tests/Inline/CommentTest.cs b/tests/Elastic.Markdown.Tests/Inline/CommentTest.cs
index 062ba4898..7822a7f89 100644
--- a/tests/Elastic.Markdown.Tests/Inline/CommentTest.cs
+++ b/tests/Elastic.Markdown.Tests/Inline/CommentTest.cs
@@ -2,7 +2,6 @@
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Inline;
diff --git a/tests/Elastic.Markdown.Tests/Inline/DirectiveBlockLinkTests.cs b/tests/Elastic.Markdown.Tests/Inline/DirectiveBlockLinkTests.cs
index 77f9e978a..b582f4fc8 100644
--- a/tests/Elastic.Markdown.Tests/Inline/DirectiveBlockLinkTests.cs
+++ b/tests/Elastic.Markdown.Tests/Inline/DirectiveBlockLinkTests.cs
@@ -6,7 +6,6 @@
using FluentAssertions;
using JetBrains.Annotations;
using Markdig.Syntax.Inlines;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Inline;
diff --git a/tests/Elastic.Markdown.Tests/Inline/HardBreakTests.cs b/tests/Elastic.Markdown.Tests/Inline/HardBreakTests.cs
index 1d761c8c0..09926a143 100644
--- a/tests/Elastic.Markdown.Tests/Inline/HardBreakTests.cs
+++ b/tests/Elastic.Markdown.Tests/Inline/HardBreakTests.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Inline;
diff --git a/tests/Elastic.Markdown.Tests/Inline/InlineAnchorTests.cs b/tests/Elastic.Markdown.Tests/Inline/InlineAnchorTests.cs
index 253b0bcf2..8f5647458 100644
--- a/tests/Elastic.Markdown.Tests/Inline/InlineAnchorTests.cs
+++ b/tests/Elastic.Markdown.Tests/Inline/InlineAnchorTests.cs
@@ -8,7 +8,6 @@
using JetBrains.Annotations;
using Markdig.Syntax;
using Markdig.Syntax.Inlines;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Inline;
diff --git a/tests/Elastic.Markdown.Tests/Inline/InlineImageTest.cs b/tests/Elastic.Markdown.Tests/Inline/InlineImageTest.cs
index 339f3a47b..b66c370ce 100644
--- a/tests/Elastic.Markdown.Tests/Inline/InlineImageTest.cs
+++ b/tests/Elastic.Markdown.Tests/Inline/InlineImageTest.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information
using FluentAssertions;
using Markdig.Syntax.Inlines;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Inline;
diff --git a/tests/Elastic.Markdown.Tests/Inline/InlineLinkTests.cs b/tests/Elastic.Markdown.Tests/Inline/InlineLinkTests.cs
index 1dd5d0723..a37021535 100644
--- a/tests/Elastic.Markdown.Tests/Inline/InlineLinkTests.cs
+++ b/tests/Elastic.Markdown.Tests/Inline/InlineLinkTests.cs
@@ -6,7 +6,6 @@
using FluentAssertions;
using JetBrains.Annotations;
using Markdig.Syntax.Inlines;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Inline;
diff --git a/tests/Elastic.Markdown.Tests/Inline/InlneBaseTests.cs b/tests/Elastic.Markdown.Tests/Inline/InlneBaseTests.cs
index 8c3cc8638..b95dc4267 100644
--- a/tests/Elastic.Markdown.Tests/Inline/InlneBaseTests.cs
+++ b/tests/Elastic.Markdown.Tests/Inline/InlneBaseTests.cs
@@ -8,7 +8,6 @@
using JetBrains.Annotations;
using Markdig.Syntax;
using Markdig.Syntax.Inlines;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Inline;
@@ -18,7 +17,7 @@ public abstract class LeafTest(ITestOutputHelper output, [LanguageIn
{
protected TDirective? Block { get; private set; }
- public override async Task InitializeAsync()
+ public override async ValueTask InitializeAsync()
{
await base.InitializeAsync();
Block = Document
@@ -37,7 +36,7 @@ public abstract class BlockTest(ITestOutputHelper output, [LanguageI
{
protected TDirective? Block { get; private set; }
- public override async Task InitializeAsync()
+ public override async ValueTask InitializeAsync()
{
await base.InitializeAsync();
Block = Document
@@ -56,7 +55,7 @@ public abstract class InlineTest(ITestOutputHelper output, [Language
{
protected TDirective? Block { get; private set; }
- public override async Task InitializeAsync()
+ public override async ValueTask InitializeAsync()
{
await base.InitializeAsync();
Block = Document
@@ -123,7 +122,7 @@ protected InlineTest(
protected virtual void AddToFileSystem(MockFileSystem fileSystem) { }
- public virtual async Task InitializeAsync()
+ public virtual async ValueTask InitializeAsync()
{
_ = Collector.StartAsync(default);
@@ -140,6 +139,6 @@ public virtual async Task InitializeAsync()
await Collector.StopAsync(default);
}
- public Task DisposeAsync() => Task.CompletedTask;
+ public ValueTask DisposeAsync() => ValueTask.CompletedTask;
}
diff --git a/tests/Elastic.Markdown.Tests/Inline/SubstitutionTest.cs b/tests/Elastic.Markdown.Tests/Inline/SubstitutionTest.cs
index e31637c89..655582335 100644
--- a/tests/Elastic.Markdown.Tests/Inline/SubstitutionTest.cs
+++ b/tests/Elastic.Markdown.Tests/Inline/SubstitutionTest.cs
@@ -5,7 +5,6 @@
using Elastic.Markdown.Myst.CodeBlocks;
using Elastic.Markdown.Myst.Substitution;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Inline;
diff --git a/tests/Elastic.Markdown.Tests/Mover/MoverTests.cs b/tests/Elastic.Markdown.Tests/Mover/MoverTests.cs
index 0331719e1..f18eaf5cd 100644
--- a/tests/Elastic.Markdown.Tests/Mover/MoverTests.cs
+++ b/tests/Elastic.Markdown.Tests/Mover/MoverTests.cs
@@ -6,7 +6,6 @@
using Elastic.Markdown.Tests.DocSet;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.Mover;
@@ -20,7 +19,7 @@ public async Task RelativeLinks()
Directory.SetCurrentDirectory(workingDirectory!);
var mover = new Move(ReadFileSystem, WriteFileSystem, Set, LoggerFactory);
- await mover.Execute("testing/mover/first-page.md", "new-folder/hello-world.md", true);
+ await mover.Execute("testing/mover/first-page.md", "new-folder/hello-world.md", true, TestContext.Current.CancellationToken);
mover.Changes.Should().HaveCount(1);
var changeSet = mover.Changes.First();
@@ -49,7 +48,7 @@ public async Task MoveToFolder()
Directory.SetCurrentDirectory(workingDirectory!);
var mover = new Move(ReadFileSystem, WriteFileSystem, Set, LoggerFactory);
- await mover.Execute("testing/mover/first-page.md", "new-folder", true);
+ await mover.Execute("testing/mover/first-page.md", "new-folder", true, TestContext.Current.CancellationToken);
mover.Changes.Should().HaveCount(1);
var changeSet = mover.Changes.First();
@@ -77,7 +76,7 @@ public async Task MoveFolderToFolder()
Directory.SetCurrentDirectory(workingDirectory!);
var mover = new Move(ReadFileSystem, WriteFileSystem, Set, LoggerFactory);
- await mover.Execute("testing/mover", "new-folder", true);
+ await mover.Execute("testing/mover", "new-folder", true, TestContext.Current.CancellationToken);
mover.Changes.Should().HaveCount(2);
var changeSet = mover.LinkModifications.FirstOrDefault(k => k.Key.From.Name == "first-page.md").Key;
diff --git a/tests/Elastic.Markdown.Tests/OutputDirectoryTests.cs b/tests/Elastic.Markdown.Tests/OutputDirectoryTests.cs
index b47c1afc9..7ff84650a 100644
--- a/tests/Elastic.Markdown.Tests/OutputDirectoryTests.cs
+++ b/tests/Elastic.Markdown.Tests/OutputDirectoryTests.cs
@@ -6,7 +6,6 @@
using Elastic.Markdown.IO;
using FluentAssertions;
using Microsoft.Extensions.Logging.Abstractions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests;
@@ -31,7 +30,7 @@ public async Task CreatesDefaultOutputDirectory()
var set = new DocumentationSet(context);
var generator = new DocumentationGenerator(set, logger);
- await generator.GenerateAll(default);
+ await generator.GenerateAll(TestContext.Current.CancellationToken);
fileSystem.Directory.Exists(".artifacts").Should().BeTrue();
diff --git a/tests/Elastic.Markdown.Tests/SettingsInclusion/IncludeTests.cs b/tests/Elastic.Markdown.Tests/SettingsInclusion/IncludeTests.cs
index bf99e32e7..d921ba66e 100644
--- a/tests/Elastic.Markdown.Tests/SettingsInclusion/IncludeTests.cs
+++ b/tests/Elastic.Markdown.Tests/SettingsInclusion/IncludeTests.cs
@@ -8,7 +8,6 @@
using Elastic.Markdown.Myst.Directives;
using Elastic.Markdown.Tests.Directives;
using FluentAssertions;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests.SettingsInclusion;
diff --git a/tests/Elastic.Markdown.Tests/TestDiagnosticsCollector.cs b/tests/Elastic.Markdown.Tests/TestDiagnosticsCollector.cs
index aeeb9c9e3..9af4bd32d 100644
--- a/tests/Elastic.Markdown.Tests/TestDiagnosticsCollector.cs
+++ b/tests/Elastic.Markdown.Tests/TestDiagnosticsCollector.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information
using Elastic.Markdown.Diagnostics;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests;
diff --git a/tests/Elastic.Markdown.Tests/TestLogger.cs b/tests/Elastic.Markdown.Tests/TestLogger.cs
index a784c5509..a6527eae2 100644
--- a/tests/Elastic.Markdown.Tests/TestLogger.cs
+++ b/tests/Elastic.Markdown.Tests/TestLogger.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information
using Microsoft.Extensions.Logging;
-using Xunit.Abstractions;
namespace Elastic.Markdown.Tests;
diff --git a/tests/authoring/authoring.fsproj b/tests/authoring/authoring.fsproj
index db3aa38ff..d9966dfac 100644
--- a/tests/authoring/authoring.fsproj
+++ b/tests/authoring/authoring.fsproj
@@ -2,24 +2,28 @@
net9.0
+
false
- false
-
- true
- true
+ true
+ Exe
+
+ false
+ true
+
+
+
+
+
-
-
-
-
+
@@ -27,29 +31,29 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
From 802e0faddcf33cfcbf8c6e8a2e5955ecb94951c3 Mon Sep 17 00:00:00 2001
From: Martijn Laarman
Date: Mon, 10 Feb 2025 21:42:01 +0100
Subject: [PATCH 4/4] fix test that we made error on purpose
---
tests/authoring/Blocks/Lists.fs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/authoring/Blocks/Lists.fs b/tests/authoring/Blocks/Lists.fs
index d0397d3c6..fbb73b663 100644
--- a/tests/authoring/Blocks/Lists.fs
+++ b/tests/authoring/Blocks/Lists.fs
@@ -21,7 +21,7 @@ type ``supports loose lists`` () =
-
- onsumption-based billing:
+ Consumption-based billing:
You pay for the actual product used, regardless of the application or use case. This is different from subscription-based billing models where customers pay a flat fee restricted by usage quotas, or one-time upfront payment billing models such as those used for on-prem software licenses.
You can purchase credits for a single or multi-year contract. Consumption is on demand, and every month we deduct from your balance based on your usage and contract terms. This allows you to seamlessly expand your usage to the full extent of your requirements and available budget, without any quotas or restrictions.