Skip to content

Commit 7934e94

Browse files
committed
test: 更新单元测试
1 parent d4fb29d commit 7934e94

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/UnitTest/Components/EditorFormTest.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,11 @@ public void CascadedEditContext_Ok()
5151
[Fact]
5252
public void Model_Error()
5353
{
54-
Assert.ThrowsAny<ArgumentNullException>(() =>
54+
var cut = Context.RenderComponent<EditorForm<Foo>>(pb =>
5555
{
56-
Context.RenderComponent<EditorForm<Foo>>(pb =>
57-
{
58-
pb.Add(a => a.Model, null);
59-
});
56+
pb.Add(a => a.Model, null);
6057
});
58+
Assert.Equal("<div class=\"bb-editor\"></div>", cut.Markup);
6159
}
6260

6361
[Fact]

0 commit comments

Comments
 (0)