Skip to content

Commit 66a29e5

Browse files
committed
test: 更新单元测试
1 parent e648f94 commit 66a29e5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/UnitTest/Components/TableTest.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5206,11 +5206,17 @@ public void TableColumn_ComplexObject()
52065206
{
52075207
var cut = Context.RenderComponent<TableColumn<MockComplexFoo, string>>(pb =>
52085208
{
5209-
pb.Add(a => a.Field, "Foo.Name");
5210-
pb.Add(a => a.FieldExpression, Utility.GenerateValueExpression(new MockComplexFoo(), "Foo.Name", typeof(string)));
5209+
pb.Add(a => a.Field, "");
52115210
});
52125211
var col = cut.Instance;
52135212
var v = col.GetFieldName();
5213+
Assert.Equal("", v);
5214+
5215+
cut.SetParametersAndRender(pb =>
5216+
{
5217+
pb.Add(a => a.FieldExpression, Utility.GenerateValueExpression(new MockComplexFoo(), "Foo.Name", typeof(string)));
5218+
});
5219+
v = col.GetFieldName();
52145220
Assert.Equal("Foo.Name", v);
52155221
}
52165222

0 commit comments

Comments
 (0)