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:
@@ -0,0 +1,38 @@
|
||||
using FluentAssertions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Ray.BiliBiliTool.Agent.BiliBiliAgent.Dtos;
|
||||
using Ray.BiliBiliTool.Agent.BiliBiliAgent.Interfaces;
|
||||
using Ray.BiliBiliTool.Console;
|
||||
|
||||
namespace Ray.BiliBiliTool.Agent.FunctionalTests;
|
||||
|
||||
public class AccountApiTests
|
||||
{
|
||||
private readonly IAccountApi _api;
|
||||
|
||||
public AccountApiTests()
|
||||
{
|
||||
var envs = new List<string>
|
||||
{
|
||||
"--ENVIRONMENT=Development",
|
||||
//"HTTP_PROXY=localhost:8888",
|
||||
//"HTTPS_PROXY=localhost:8888"
|
||||
};
|
||||
IHost host = Program.CreateHost(envs.ToArray());
|
||||
_api = host.Services.GetRequiredService<IAccountApi>();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetCoinBalance_Normal_GetCoinBalance()
|
||||
{
|
||||
// Act
|
||||
BiliApiResponse<CoinBalance> re = await _api.GetCoinBalanceAsync(null);
|
||||
|
||||
// Arrange
|
||||
|
||||
// Assert
|
||||
re.Code.Should().Be(0);
|
||||
re.Data.Money.Should().NotBeNull();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user