Skip to content

Commit 96adaf1

Browse files
committed
test: 增加单元测试
1 parent 387f70c commit 96adaf1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/UnitTest/Components/TableTest.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6205,6 +6205,22 @@ public async Task DynamicContext_Add()
62056205
await cut.InvokeAsync(() => delete.Instance.OnConfirm());
62066206
}
62076207

6208+
[Fact]
6209+
public void TableColumn_SupportComplexProperty_Ok()
6210+
{
6211+
var data = new DataTable();
6212+
data.Columns.Add("Foo.Name", typeof(string));
6213+
data.Rows.Add("test01");
6214+
data.AcceptChanges();
6215+
6216+
var cut = Context.RenderComponent<Table<DynamicObject>>(pb =>
6217+
{
6218+
pb.Add(a => a.RenderMode, TableRenderMode.Table);
6219+
pb.Add(a => a.DynamicContext, new DataTableDynamicContext(data));
6220+
});
6221+
cut.Contains("test01");
6222+
}
6223+
62086224
[Fact]
62096225
public async Task IsKeepSelectedRowAfterAdd_Ok()
62106226
{

0 commit comments

Comments
 (0)