ant-design-blazor/tests/AntDesign.TestKit/TestNavigationManager.cs
Patrick ba2c5e51d8 test: add TestKit for public tests (#1248)
* test: change folder structure and add new TestKit csproj for public testing of AntDesign-based applications

* docs: added CN and EN docs about TestKit

* fix doc translate

* change the directory structure

Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-04-04 21:37:06 +08:00

22 lines
548 B
C#

using Microsoft.AspNetCore.Components;
namespace AntDesign.Tests
{
public class TestNavigationManager : NavigationManager
{
public delegate void NavigatedCallback(string uri, bool forceLoad);
public TestNavigationManager()
{
Initialize("http://localhost/", "http://localhost/");
}
protected override void NavigateToCore(string uri, bool forceLoad)
{
Navigated?.Invoke(uri, forceLoad);
}
public event NavigatedCallback Navigated;
}
}