Skip to content

Commit 5fcaaec

Browse files
committed
test: 更新单元测试
1 parent ff68ad3 commit 5fcaaec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/UnitTest/Components/ScrollTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace UnitTest.Components;
77

8-
public class ScrollTest : TestBase
8+
public class ScrollTest : BootstrapBlazorTestBase
99
{
1010
[Fact]
1111
public void Height_Ok()
@@ -31,20 +31,20 @@ public void ScrollWidth_Ok()
3131
builder.Add(a => a.Width, "500px");
3232
});
3333

34-
Assert.Equal("<div class=\"scroll\" style=\"width: 500px; --bb-scroll-width: 5px; --bb-scroll-hover-width: 5px;\"></div>", cut.Markup);
34+
Assert.Contains("style=\"width: 500px; --bb-scroll-width: 5px; --bb-scroll-hover-width: 5px;\"", cut.Markup);
3535

3636
cut.SetParametersAndRender(builder =>
3737
{
3838
builder.Add(a => a.ScrollWidth, 6);
3939
});
40-
Assert.Equal("<div class=\"scroll\" style=\"width: 500px; --bb-scroll-width: 6px; --bb-scroll-hover-width: 5px;\"></div>", cut.Markup);
40+
Assert.Contains("style=\"width: 500px; --bb-scroll-width: 6px; --bb-scroll-hover-width: 5px;\"", cut.Markup);
4141

4242
cut.SetParametersAndRender(builder =>
4343
{
4444
builder.Add(a => a.ScrollWidth, 6);
4545
builder.Add(a => a.ScrollHoverWidth, 12);
4646
});
47-
Assert.Equal("<div class=\"scroll\" style=\"width: 500px; --bb-scroll-width: 6px; --bb-scroll-hover-width: 12px;\"></div>", cut.Markup);
47+
Assert.Contains("style=\"width: 500px; --bb-scroll-width: 6px; --bb-scroll-hover-width: 12px;\"", cut.Markup);
4848
}
4949

5050
[Fact]

0 commit comments

Comments
 (0)