ant-design-blazor/tests/AntDesignTestBase.cs
Diego Frata 6662870ac8 test(button): add some button tests (#460)
Co-authored-by: James Yeung <shunjiey@hotmail.com>
2020-08-05 17:06:14 +08:00

28 lines
688 B
C#

using System;
using Bunit;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.DependencyInjection;
namespace AntDesign.Tests
{
public class AntDesignTestBase : IDisposable
{
public TestContext Context { get; }
public TestNavigationManager NavigationManager { get; }
public AntDesignTestBase()
{
Context = new TestContext();
NavigationManager = new TestNavigationManager();
Context.Services.AddScoped<NavigationManager>(sp => NavigationManager);
Context.Services.AddAntDesign();
}
public void Dispose()
{
Context?.Dispose();
}
}
}