ant-design-blazor/tests/AntDesign.Tests/button/ButtonGroupTests.razor

18 lines
507 B
C#
Raw Normal View History

@inherits AntDesignTestBase
@code {
[Theory]
[InlineData("small", "-sm")]
[InlineData("large", "-lg")]
public void Size_is_applied(string size, string expectedCssClass)
{
var cut = Render<ButtonGroup>(@<ButtonGroup Size="@size">
<Button>Test</Button>
</ButtonGroup>
);
string classsAttribute = cut.Find("div").GetAttribute("class")!;
classsAttribute.Should().Contain(expectedCssClass);
cut.Instance.Size.Should().Be(size);
}
}