Skip to content

Commit c80ed5c

Browse files
committed
test: 增加单元测试
1 parent 7e9dcb9 commit c80ed5c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/UnitTest/Components/ModalDialogTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ public void BodyContext_Ok()
166166
{
167167
pb.AddChildContent<ModalDialog>(pb =>
168168
{
169+
pb.Add(d => d.FooterContentTemplate, builder => builder.AddContent(0, "footer-content-template"));
169170
pb.Add(d => d.BodyContext, new Foo() { Name = "Test_BodyContext" });
170171
pb.Add(d => d.BodyTemplate, BootstrapDynamicComponent.CreateComponent<MockModalDialogContentComponent>().Render());
171172
});
@@ -174,6 +175,7 @@ public void BodyContext_Ok()
174175
var content = cut.FindComponent<MockModalDialogContentComponent>().Instance;
175176
var f = content.Context as Foo;
176177
Assert.Equal("Test_BodyContext", f!.Name);
178+
cut.Contains("footer-content-template");
177179
}
178180

179181
[Fact]

0 commit comments

Comments
 (0)