mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 17:31:42 +08:00
bd34858efd
* feat: add locale * feat: add locale interfaces * fix: add locale interfaces for components * fix: use local classes instead of interfaces * feat: implement the locale provider * feat: make some components to support localization * fix: default language * fix: test * chore: remove the useless reference
32 lines
833 B
C#
32 lines
833 B
C#
using System;
|
|
using System.Globalization;
|
|
using Bunit;
|
|
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Newtonsoft.Json;
|
|
|
|
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();
|
|
|
|
CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.GetCultureInfo("en-US");
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
Context?.Dispose();
|
|
}
|
|
}
|
|
}
|