logo

TestKit

You can use the TestKit package in order to create a BUnit test context dervied from AntDesignTestBase.

This will add the required AntDesign services to the test context so that you can create unit tests.

public class ButtonTests : AntDesignTestBase
{
    [Fact]
    public void Renders_an_empty_button()
    {
        var cut = Context.RenderComponent<AntDesign.Button>();
        cut.MarkupMatches(@"
            <button class=""ant-btn ant-btn-default"" id:ignore type=""button"" ant-click-animating-without-extra-node=""false""></button>
        ");
    }
}
Getting nightly builds How to Contribute
文档已更新,请点击 此处 更新。
A new version of this app is available. Click here to update.