Skip to content

Commit ada1e7a

Browse files
committed
test: 增加单元测试
1 parent 5dade84 commit ada1e7a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/UnitTest/Components/CalendarTest.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,17 @@ await cut.InvokeAsync(() =>
233233
});
234234
Assert.NotEqual(v, DateTime.MinValue);
235235
}
236+
237+
[Fact]
238+
public void FirstDayOfWeek_Ok()
239+
{
240+
var cut = Context.RenderComponent<Calendar>(pb =>
241+
{
242+
pb.Add(a => a.Value, new DateTime(2025, 02, 20));
243+
pb.Add(a => a.FirstDayOfWeek, DayOfWeek.Monday);
244+
});
245+
var labels = cut.FindAll(".calendar-table thead > tr > th");
246+
Assert.Equal("一", labels[0].TextContent);
247+
Assert.Equal("日", labels[6].TextContent);
248+
}
236249
}

0 commit comments

Comments
 (0)