ant-design-blazor/tests/AntDesign.Tests/button/ButtonGroupTests.razor
Andrzej Bakun 58c5f2b6cc tests: added tests for Button, Checkbox & DateHelper to increase the coverage (#2060)
* tests: added

* missed scenarios for Button and ButtonGroup
2021-10-28 11:21:10 +08:00

18 lines
507 B
C#

@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);
}
}