-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
System.Text.Json migration and .NET 8 update
- Replaced Newtonsoft.Json with System.Text.Json - Added type converters for proper JSON handling - Updated to .NET 8.0 - Improved async implementation - Fixed thumbnail/image URLs for load balancing support
- Loading branch information
1 parent
aeb71eb
commit 6a4991d
Showing
20 changed files
with
1,121 additions
and
644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,28 @@ | ||
using System.Collections.Generic; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace NHentaiAPI.Tests | ||
namespace NHentaiAPI.Tests; | ||
|
||
public class BaseUnitTest | ||
{ | ||
public class BaseUnitTest | ||
{ | ||
protected NHentaiClient NHentaiClient { get; private set; } | ||
protected NHentaiClient NHentaiClient { get; private set; } | ||
|
||
[TestInitialize] | ||
public void InitializeTest() | ||
{ | ||
NHentaiClient = new TestNHentaiClient("a", new Dictionary<string, string>()); | ||
} | ||
[TestInitialize] | ||
public void InitializeTest() | ||
{ | ||
NHentaiClient = new TestNHentaiClient("a", new Dictionary<string, string>()); | ||
} | ||
} | ||
|
||
public class TestNHentaiClient : NHentaiClient | ||
public class TestNHentaiClient : NHentaiClient | ||
{ | ||
public TestNHentaiClient(string userAgent, Dictionary<string, string> cookies = null) : base(userAgent, cookies) | ||
{ | ||
#region Urls | ||
} | ||
|
||
//protected override string ApiRootUrl => "https://nhent.ai"; | ||
#region Urls | ||
|
||
#endregion | ||
//protected override string ApiRootUrl => "https://nhent.ai"; | ||
|
||
public TestNHentaiClient(string userAgent, Dictionary<string, string> cookies = null) : base(userAgent, cookies) | ||
{ | ||
} | ||
} | ||
#endregion | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="FlareSolverrSharp" Version="2.2.6" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" /> | ||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" /> | ||
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" /> | ||
<PackageReference Include="Refit" Version="6.3.2" /> | ||
<PackageReference Include="Refit.Newtonsoft.Json" Version="6.3.2" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/> | ||
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3"/> | ||
<PackageReference Include="MSTest.TestFramework" Version="3.6.3"/> | ||
<PackageReference Include="Refit" Version="8.0.0"/> | ||
<PackageReference Include="Refit.Newtonsoft.Json" Version="8.0.0"/> | ||
<PackageReference Include="System.Text.Json" Version="9.0.0"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\NHentaiAPI\NHentaiAPI.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\NHentaiAPI\NHentaiAPI.csproj"/> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.