Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert project to xUnit #495

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

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

This file was deleted.

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;
9 changes: 6 additions & 3 deletions test/Html2Markdown.Test/Html2Markdown.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
</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">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading