Skip to content

Commit f11fa0f

Browse files
committed
test: 增加单元测试
1 parent c09a567 commit f11fa0f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/UnitTest/Components/DateTimePickerTest.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,19 @@ class MockCalendarHolidayService : ICalendarHolidays
482482
public bool IsWorkday(DateTime dt) => dt == new DateTime(2024, 4, 7);
483483
}
484484

485+
[Fact]
486+
public async Task TriggerHideCallback_Ok()
487+
{
488+
var cut = Context.RenderComponent<DateTimePicker<DateTime>>(pb =>
489+
{
490+
pb.Add(a => a.DayTemplate, dt => builder =>
491+
{
492+
builder.AddContent(0, "day-template");
493+
});
494+
});
495+
await cut.InvokeAsync(() => cut.Instance.TriggerHideCallback());
496+
}
497+
485498
[Fact]
486499
public void DayTemplate_Ok()
487500
{

0 commit comments

Comments
 (0)