All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 3s
22 lines
550 B
C#
22 lines
550 B
C#
namespace WebApi.Test.Repository;
|
|
|
|
public class ConfigRepositoryTest : RepositoryTestBase
|
|
{
|
|
private readonly IConfigRepository _repository;
|
|
|
|
public ConfigRepositoryTest()
|
|
{
|
|
_repository = new ConfigRepository(FreeSql);
|
|
}
|
|
|
|
[Fact]
|
|
public async Task GetByKeyAsync_获取配置_Test()
|
|
{
|
|
await _repository.AddAsync(new ConfigEntity { Key = "k1", Value = "v1" });
|
|
|
|
var config = await _repository.GetByKeyAsync("k1");
|
|
config.Should().NotBeNull();
|
|
config.Value.Should().Be("v1");
|
|
}
|
|
}
|