mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-12 11:55:24 +08:00
5c2f48f718
* fix(module:select): arrow down click does not auto close * test case added
33 lines
980 B
C#
33 lines
980 B
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using AntDesign.JsInterop;
|
|
using Microsoft.JSInterop;
|
|
using Moq;
|
|
|
|
namespace AntDesign.Tests
|
|
{
|
|
public class TestDomEventService : AntDesign.JsInterop.DomEventService
|
|
{
|
|
public Mock<IDomEventListener> MockedDomEventListener { get; set; }
|
|
public TestDomEventService(IJSRuntime js, Mock<IDomEventListener> mock = null) : base(js)
|
|
{
|
|
if (mock is not null)
|
|
{
|
|
MockedDomEventListener = mock;
|
|
}
|
|
}
|
|
|
|
public override IDomEventListener CreateDomEventListerner()
|
|
{
|
|
return MockedDomEventListener?.Object ?? new TestDomEventListerner();
|
|
}
|
|
}
|
|
}
|