mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 04:00:07 +00:00
Test - Add MethodRunnerQueueFacts.DisposeQueueThenEnqueueMethodInvocation
Test to validate that MethodRunnerQueue doesn't have the same issues as #3639
This commit is contained in:
@@ -156,6 +156,7 @@
|
||||
<Compile Include="Framework\ConcurrentMethodRunnerQueueFacts.cs" />
|
||||
<Compile Include="Framework\CamelCaseNamingConverterFacts.cs" />
|
||||
<Compile Include="Framework\LegacyCamelCaseJavascriptNameConverterFacts.cs" />
|
||||
<Compile Include="Framework\MethodRunnerQueueFacts.cs" />
|
||||
<Compile Include="Framework\MimeTypeMappingFacts.cs" />
|
||||
<Compile Include="Framework\PathCheckFacts.cs" />
|
||||
<Compile Include="Framework\RequestContextBuilderFacts.cs" />
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright © 2021 The CefSharp Authors. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
using CefSharp.Internals;
|
||||
using Xunit;
|
||||
|
||||
namespace CefSharp.Test.Framework
|
||||
{
|
||||
public class MethodRunnerQueueFacts
|
||||
{
|
||||
[Fact]
|
||||
public void DisposeQueueThenEnqueueMethodInvocation()
|
||||
{
|
||||
var methodInvocation = new MethodInvocation(1, 1, 1, "Testing", 1);
|
||||
methodInvocation.Parameters.Add("Echo Me!");
|
||||
|
||||
var objectRepository = new JavascriptObjectRepository
|
||||
{
|
||||
NameConverter = null
|
||||
};
|
||||
|
||||
var methodRunnerQueue = new MethodRunnerQueue(objectRepository);
|
||||
|
||||
//Dispose
|
||||
methodRunnerQueue.Dispose();
|
||||
|
||||
//Enqueue
|
||||
var ex = Record.Exception(() => methodRunnerQueue.Enqueue(methodInvocation));
|
||||
|
||||
//Ensure no exception thrown
|
||||
Assert.Null(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user