Skip to content

Commit

Permalink
Convert project to xUnit
Browse files Browse the repository at this point in the history
Closes #494
  • Loading branch information
baynezy committed Dec 18, 2024
1 parent 699ae07 commit 2ee3364
Show file tree
Hide file tree
Showing 15 changed files with 135 additions and 146 deletions.
3 changes: 3 additions & 0 deletions .idea/.idea.Html2Markdown/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .idea/.idea.Html2Markdown/.idea/sonarlint.xml

This file was deleted.

Empty file.
Empty file.
5 changes: 0 additions & 5 deletions .idea/.idea.Html2Markdown/.idea/sonarlint/issuestore/index.pb

This file was deleted.

Empty file.
Empty file.

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Added support extending existing Schemes for customisation
- Migrated to using xUnit and FluentAssertions for testing

## [7.0.0.8] - 2024-08-15

Expand Down
6 changes: 3 additions & 3 deletions test/Html2Markdown.Test/CommonMarkSchemeConverterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ protected override Task CheckConversion(string html, IScheme scheme = null)
return base.CheckConversion(html, _scheme);
}

[Test]
[Fact]
public Task Convert_WhenThereMultilineCodeTagsWithSyntaxHighlight_ThenReplaceWithMultilineMarkdownBlock001()
{
const string html = @"So this text has multiline code.
Expand All @@ -24,7 +24,7 @@ Some code we are looking at
return CheckConversion(html);
}

[Test]
[Fact]
public Task Convert_WhenThereMultilineCodeTagsWithSyntaxHighlight_ThenReplaceWithMultilineMarkdownBlock002()
{
const string html = @"So this text has multiline code.
Expand All @@ -37,7 +37,7 @@ Some code we are looking at
return CheckConversion(html);
}

[Test]
[Fact]
public Task Convert_WhenThereMultilineCodeTagsWithSyntaxHighlight_ThenReplaceWithMultilineMarkdownBlock003()
{
const string html = @"So this text has multiline code.
Expand Down
10 changes: 2 additions & 8 deletions test/Html2Markdown.Test/ConvertFromFileTest.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
namespace Html2Markdown.Test;

[TestFixture]
public class ConvertFromFileTest {
private string _testPath;
private readonly string _testPath = TestPath();

[SetUp]
public void SetUp() {
_testPath = TestPath();
}

[Test]
[Fact]
public Task ConvertFile_WhenReadingInHtmlFile_ThenConvertToMarkdown()
{
var sourcePath = _testPath + "TestHtml.txt";
Expand Down
5 changes: 3 additions & 2 deletions test/Html2Markdown.Test/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Global using directives

global using FluentAssertions;
global using System.Threading.Tasks;
global using NUnit.Framework;
global using VerifyNUnit;
global using VerifyXunit;
global using Xunit;
6 changes: 3 additions & 3 deletions test/Html2Markdown.Test/Html2Markdown.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="8.0.0-alpha.1" />
<PackageReference Include="JunitXml.TestLogger" Version="4.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit" Version="4.3.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="Verify.NUnit" Version="28.6.0" />
<PackageReference Include="Verify.Xunit" Version="28.6.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 2ee3364

Please sign in to comment.