mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-11-30 19:18:40 +08:00
6662870ac8
Co-authored-by: James Yeung <shunjiey@hotmail.com>
28 lines
688 B
C#
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();
|
|
}
|
|
}
|
|
}
|