pull file
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
Close Stale Issues / close_stale_issues (push) Has been cancelled
repo-sync / repo-sync (push) Has been cancelled
auto-deploy-tencent-scf / pre-check (push) Has been cancelled
auto-deploy-tencent-scf / deploy serverless (push) Has been cancelled
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
Close Stale Issues / close_stale_issues (push) Has been cancelled
repo-sync / repo-sync (push) Has been cancelled
auto-deploy-tencent-scf / pre-check (push) Has been cancelled
auto-deploy-tencent-scf / deploy serverless (push) Has been cancelled
This commit is contained in:
33
test/DomainServiceTest/VideoDomainServiceTest.cs
Normal file
33
test/DomainServiceTest/VideoDomainServiceTest.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Ray.BiliBiliTool.Infrastructure.Helpers;
|
||||
using Ray.Infrastructure.Helpers;
|
||||
|
||||
namespace DomainServiceTest
|
||||
{
|
||||
public class VideoDomainServiceTest
|
||||
{
|
||||
public VideoDomainServiceTest()
|
||||
{
|
||||
Program.CreateHost(new[] { "--ENVIRONMENT=Development" });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetVideoCountOfUp_Test()
|
||||
{
|
||||
using var scope = Global.ServiceProviderRoot.CreateScope();
|
||||
var config = Global.ConfigurationRoot;
|
||||
var domainService = scope.ServiceProvider.GetRequiredService<IVideoDomainService>();
|
||||
|
||||
await domainService.GetVideoCountOfUp(1585227649, null);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetRandomVideoOfUp_Test()
|
||||
{
|
||||
using var scope = Global.ServiceProviderRoot.CreateScope();
|
||||
var config = Global.ConfigurationRoot;
|
||||
var domainService = scope.ServiceProvider.GetRequiredService<IVideoDomainService>();
|
||||
|
||||
await domainService.GetRandomVideoOfUp(1585227649, 1, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user