fix: fix dandan unit test. #69

This commit is contained in:
cxfksword
2025-02-03 15:20:29 +08:00
parent 8d1dd6c379
commit adb41e8251
6 changed files with 48 additions and 24 deletions

View File

@@ -18,5 +18,18 @@ namespace Jellyfin.Plugin.Danmu.Test
options.SingleLine = true;
options.TimestampFormat = "hh:mm:ss ";
}));
[TestInitialize]
public void SetUp()
{
DotNetEnv.Env.TraversePath().Load();
}
[TestCleanup]
public void TearDown()
{
// 清理代码
// 例如,释放资源或重置状态
}
}
}

View File

@@ -11,16 +11,8 @@ namespace Jellyfin.Plugin.Danmu.Test
{
[TestClass]
public class DandanApiTest
public class DandanApiTest : BaseTest
{
ILoggerFactory loggerFactory = LoggerFactory.Create(builder =>
builder.AddSimpleConsole(options =>
{
options.IncludeScopes = true;
options.SingleLine = true;
options.TimestampFormat = "hh:mm:ss ";
}));
[TestMethod]
public void TestSearch()
{

View File

@@ -17,18 +17,8 @@ namespace Jellyfin.Plugin.Danmu.Test
{
[TestClass]
public class DandanTest
public class DandanTest : BaseTest
{
ILoggerFactory loggerFactory = LoggerFactory.Create(builder =>
builder.AddSimpleConsole(options =>
{
options.IncludeScopes = true;
options.SingleLine = true;
options.TimestampFormat = "hh:mm:ss ";
}));
[TestMethod]
public void TestAddMovie()
{

View File

@@ -6,6 +6,7 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNetEnv" Version="3.1.1" />
<PackageReference Include="Google.Protobuf" Version="3.22.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Moq" Version="4.18.2" />