!2372 test(#I4SKQP): add unit test for AutoComplete

* test: 增加 ShowLabel 设置
* refactor: 移除 set 属性
This commit is contained in:
Argo 2022-01-31 08:22:23 +00:00
parent 707c1904dc
commit 4d27c6d9a1
2 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,7 @@ public class AjaxService
/// <summary>
/// 获得 回调委托缓存集合
/// </summary>
private List<(IComponent Key, Func<AjaxOption, Task<string?>> Callback)> Cache { get; set; } = new();
private List<(IComponent Key, Func<AjaxOption, Task<string?>> Callback)> Cache { get; } = new();
/// <summary>
/// 注册服务

View File

@ -19,6 +19,8 @@ public class AutoCompleteTest : BootstrapBlazorTestBase
builder.Add(a => a.IsLikeMatch, true);
builder.Add(a => a.IgnoreCase, false);
builder.Add(a => a.Debounce, 2000);
builder.Add(a => a.ShowLabel, true);
builder.Add(a => a.DisplayText, "test");
});
Assert.Contains("<div class=\"auto-complete\"", cut.Markup);
}