Skip to content

Commit

Permalink
ArkProjects.EHentai.Api net8 + fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mixa3607 committed May 14, 2024
1 parent 2db9cd8 commit 6d32b18
Show file tree
Hide file tree
Showing 16 changed files with 857 additions and 532 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -10,14 +10,14 @@

<ItemGroup>
<PackageReference Include="ArkProjects.XUnit" Version="1.0.0" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using ArkProjects.XUnit.Json;
using HtmlAgilityPack;
using FluentAssertions;
using Newtonsoft.Json;

namespace ArkProjects.EHentai.Api.Tests
{
Expand All @@ -10,6 +11,7 @@ public class ParsingTests
[Theory]
[JsonData("./files/{class}/{method}_1.json")]
[JsonData("./files/{class}/{method}_2.json")]
[JsonData("./files/{class}/{method}_3.json")]
public void HathPerks(ParsingTestData<HathPerksResponse> data)
{
var doc = new HtmlDocument();
Expand All @@ -19,13 +21,13 @@ public void HathPerks(ParsingTestData<HathPerksResponse> data)
}

[Theory]
[JsonData("./files/{class}/{method}_1.json")]
[JsonData("./files/{class}/{method}_2.json")]
[JsonData("./files/{class}/{method}_3.json")]
public void HathStatus(ParsingTestData<HathStatusResponse> data)
{
var doc = new HtmlDocument();
doc.Load(data.HtmlPath);
var resp = HathStatusResponse.Parse(doc);
var j = JsonConvert.SerializeObject(resp, Formatting.Indented);
resp.Should().BeEquivalentTo(data.ExpectedResult);
}
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"TestCases": [
{
"ExpectedResult": {
"Hath": 729.01
},
"HtmlPath": "./files/ParsingTests/HathPerks_3.html"
}
]
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6d32b18

Please sign in to comment.