mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
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();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|