Skip to content

Commit 10d8bdc

Browse files
committed
New Moq behaviour workarounds
- work around devlooped/moq#129 and devlooped/moq#212; Moq creates proxies for all `interface` methods - e.g. set up `IDisposable.Dispose()` calls - related bug devlooped/moq#212 means we can't use `MockBehavior.Strict` in some cases - especially when method returns a value and therefore can't be set up to call base - `CallBase = true` is often required in these cases - work around devlooped/moq#149; `DefaultValue.Mock` restrictions - where necessary, explicitly set up members instead - work around odd failures in `JsonResultTest` using `SetupSet()` on deep properties - use `MockBehavior.Strict` in `NullContentIsNotOutput()` to confirm `Write()` is not called - handle less-predictable proxy type names
1 parent 78b0d25 commit 10d8bdc

20 files changed

+99
-62
lines changed

test/Microsoft.Web.Mvc.Test/Test/AjaxOnlyAttributeTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void IsValidForRequestThrowsIfControllerContextIsNull()
5151

5252
private static ControllerContext GetControllerContext(bool containsHeader)
5353
{
54-
Mock<ControllerContext> mockContext = new Mock<ControllerContext> { DefaultValue = DefaultValue.Mock };
54+
Mock<ControllerContext> mockContext = new Mock<ControllerContext>();
5555

5656
NameValueCollection nvc = new NameValueCollection();
5757
if (containsHeader)

test/System.Web.Http.Owin.Test/HttpMessageHandlerAdapterTest.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
using Microsoft.Owin;
2323
using Microsoft.TestCommon;
2424
using Moq;
25-
using Moq.Protected;
2625

2726
namespace System.Web.Http.Owin
2827
{
@@ -1705,7 +1704,7 @@ private static IExceptionLogger CreateDummyExceptionLogger()
17051704
private static HttpMessageHandler CreateDummyMessageHandler()
17061705
{
17071706
Mock<HttpMessageHandler> mock = new Mock<HttpMessageHandler>(MockBehavior.Strict);
1708-
mock.Protected().Setup("Dispose", ItExpr.IsAny<bool>());
1707+
mock.As<IDisposable>().Setup(c => c.Dispose());
17091708
return mock.Object;
17101709
}
17111710

test/System.Web.Http.Owin.Test/HttpMessageHandlerOptionsTests.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using System.Web.Http.Hosting;
88
using Microsoft.TestCommon;
99
using Moq;
10-
using Moq.Protected;
1110

1211
namespace System.Web.Http.Owin
1312
{
@@ -117,7 +116,7 @@ private static IExceptionLogger CreateDummyExceptionLogger()
117116
private static HttpMessageHandler CreateDummyMessageHandler()
118117
{
119118
Mock<HttpMessageHandler> mock = new Mock<HttpMessageHandler>(MockBehavior.Strict);
120-
mock.Protected().Setup("Dispose", ItExpr.IsAny<bool>());
119+
mock.As<IDisposable>().Setup(c => c.Dispose());
121120
return mock.Object;
122121
}
123122

test/System.Web.Http.Owin.Test/NonOwnedStreamTests.cs

+10-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public void Read_DelegatesToInnerStream()
2929
mock.Setup(s => s.Read(It.IsAny<byte[]>(), It.IsAny<int>(), It.IsAny<int>()))
3030
.Returns(expectedBytesRead);
3131
mock.Setup(s => s.Close());
32+
mock.As<IDisposable>().Setup(s => s.Dispose());
3233

3334
using (Stream innerStream = mock.Object)
3435
using (Stream product = CreateProductUnderTest(innerStream))
@@ -52,6 +53,7 @@ public void Read_IfDisposed_Throws()
5253
// Arrange
5354
Mock<Stream> mock = new Mock<Stream>(MockBehavior.Strict);
5455
mock.Setup(s => s.Close());
56+
mock.As<IDisposable>().Setup(s => s.Dispose());
5557

5658
using (Stream innerStream = mock.Object)
5759
using (Stream product = CreateProductUnderTest(innerStream))
@@ -77,6 +79,7 @@ public void CanRead_DelegatesToInnerStream(bool expectedCanRead)
7779
mock.SetupGet(s => s.CanRead)
7880
.Returns(expectedCanRead);
7981
mock.Setup(s => s.Close());
82+
mock.As<IDisposable>().Setup(s => s.Dispose());
8083

8184
using (Stream innerStream = mock.Object)
8285
using (Stream product = CreateProductUnderTest(innerStream))
@@ -95,6 +98,7 @@ public void CanRead_IfDisposed_ReturnsFalse()
9598
// Arrange
9699
Mock<Stream> mock = new Mock<Stream>(MockBehavior.Strict);
97100
mock.Setup(s => s.Close());
101+
mock.As<IDisposable>().Setup(s => s.Dispose());
98102

99103
using (Stream innerStream = mock.Object)
100104
using (Stream product = CreateProductUnderTest(innerStream))
@@ -116,7 +120,8 @@ public void Dispose_DoesNotDisposeInnerStream()
116120
bool innerStreamDisposed = false;
117121
Mock<Stream> mock = new Mock<Stream>(MockBehavior.Strict);
118122
mock.Setup(s => s.Close()).Callback(() => innerStreamDisposed = true);
119-
mock.Protected().Setup("Dispose", ItExpr.IsAny<bool>()).Callback(() => innerStreamDisposed = true);
123+
mock.As<IDisposable>().Setup(s => s.Dispose());
124+
mock.Protected().Setup("Dispose", true).Callback(() => innerStreamDisposed = true);
120125

121126
using (Stream innerStream = mock.Object)
122127
using (Stream product = CreateProductUnderTest(innerStream))
@@ -134,6 +139,7 @@ public void Dispose_IfCalledTwice_DoesNotThrow()
134139
// Arrange
135140
Mock<Stream> mock = new Mock<Stream>(MockBehavior.Strict);
136141
mock.Setup(s => s.Close());
142+
mock.As<IDisposable>().Setup(s => s.Dispose());
137143

138144
using (Stream innerStream = mock.Object)
139145
using (Stream product = CreateProductUnderTest(innerStream))
@@ -152,7 +158,8 @@ public void Close_DoesNotDisposeInnerStream()
152158
bool innerStreamDisposed = false;
153159
Mock<Stream> mock = new Mock<Stream>(MockBehavior.Strict);
154160
mock.Setup(s => s.Close()).Callback(() => innerStreamDisposed = true);
155-
mock.Protected().Setup("Dispose", ItExpr.IsAny<bool>()).Callback(() => innerStreamDisposed = true);
161+
mock.As<IDisposable>().Setup(s => s.Dispose());
162+
mock.Protected().Setup("Dispose", true).Callback(() => innerStreamDisposed = true);
156163

157164
using (Stream innerStream = mock.Object)
158165
using (Stream product = CreateProductUnderTest(innerStream))
@@ -170,6 +177,7 @@ public void Close_DisposesThisObject()
170177
// Arrange
171178
Mock<Stream> mock = new Mock<Stream>(MockBehavior.Strict);
172179
mock.Setup(s => s.Close());
180+
mock.As<IDisposable>().Setup(s => s.Dispose());
173181

174182
using (Stream innerStream = mock.Object)
175183
using (Stream product = CreateProductUnderTest(innerStream))

test/System.Web.Http.SelfHost.Test/SelfHostHttpRequestContextTests.cs

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
using System.Diagnostics.Contracts;
77
using System.IdentityModel.Claims;
88
using System.IdentityModel.Policy;
9-
using System.IdentityModel.Selectors;
10-
using System.IdentityModel.Tokens;
11-
using System.Linq;
129
using System.Net;
1310
using System.Net.Http;
1411
using System.Security.Cryptography.X509Certificates;
@@ -21,7 +18,6 @@
2118
using System.Web.Http.Routing;
2219
using Microsoft.TestCommon;
2320
using Moq;
24-
using Moq.Protected;
2521

2622
namespace System.Web.Http.SelfHost
2723
{
@@ -705,7 +701,7 @@ private static SecurityMessageProperty CreateSecurityProperty(X509Certificate2 c
705701
private static Mock<RequestContext> CreateServiceModelContextMock()
706702
{
707703
Mock<RequestContext> mock = new Mock<RequestContext>(MockBehavior.Strict);
708-
mock.Protected().Setup("Dispose", true);
704+
mock.As<IDisposable>().Setup(c => c.Dispose());
709705
return mock;
710706
}
711707

test/System.Web.Http.Test/Dispatcher/DefaultHttpControllerActivatorTest.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ public void Create_ThrowsForNullDependencyScope()
152152
"An error occurred when trying to create a controller of type 'SimpleController'. Make sure that the controller has a parameterless public constructor.",
153153
exception.Message);
154154
Assert.NotNull(exception.InnerException);
155-
Assert.Equal(
156-
"A dependency resolver of type 'IDependencyResolverProxy' returned an invalid value of null from its BeginScope method. If the container does not have a concept of scope, consider returning a scope that resolves in the root of the container instead.",
155+
Assert.Contains("A dependency resolver of type 'ObjectProxy_", exception.InnerException.Message);
156+
Assert.Contains(
157+
"' returned an invalid value of null from its BeginScope method. If the container does not have a concept " +
158+
"of scope, consider returning a scope that resolves in the root of the container instead.",
157159
exception.InnerException.Message);
158160

159161
mockResolver.Verify();

test/System.Web.Http.Test/Dispatcher/HttpRoutingDispatcherTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public async Task SendAsync_UsesRouteDataFromRequestContext()
109109
{
110110
// Arrange
111111
Mock<HttpMessageHandler> doNotUseDefaultHandlerMock = new Mock<HttpMessageHandler>(MockBehavior.Strict);
112-
doNotUseDefaultHandlerMock.Protected().Setup("Dispose", true);
112+
doNotUseDefaultHandlerMock.As<IDisposable>().Setup(c => c.Dispose());
113113

114114
using (HttpConfiguration configuration = new HttpConfiguration())
115115
using (HttpMessageHandler doNoUseDefaultHandler = doNotUseDefaultHandlerMock.Object)
@@ -145,7 +145,7 @@ public async Task SendAsync_IgnoreRoute_UsesRouteDataWithStopRoutingHandlerFromR
145145
{
146146
// Arrange
147147
Mock<HttpMessageHandler> doNotUseDefaultHandlerMock = new Mock<HttpMessageHandler>(MockBehavior.Strict);
148-
doNotUseDefaultHandlerMock.Protected().Setup("Dispose", true);
148+
doNotUseDefaultHandlerMock.As<IDisposable>().Setup(c => c.Dispose());
149149

150150
using (HttpConfiguration configuration = new HttpConfiguration())
151151
using (HttpMessageHandler doNoUseDefaultHandler = doNotUseDefaultHandlerMock.Object)

test/System.Web.Http.Test/ExceptionHandling/ExceptionHandlerTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class ExceptionHandlerTests
1414
public void HandleAsync_IfContextIsNull_Throws()
1515
{
1616
// Arrange
17-
Mock<ExceptionHandler> mock = new Mock<ExceptionHandler>(MockBehavior.Strict);
17+
Mock<ExceptionHandler> mock = new Mock<ExceptionHandler> { CallBase = true };
1818
IExceptionHandler product = mock.Object;
1919

2020
ExceptionHandlerContext context = null;
@@ -28,7 +28,7 @@ public void HandleAsync_IfContextIsNull_Throws()
2828
public void HandleAsync_IfShouldHandleReturnsTrue_DelegatesToHandleAsyncCore()
2929
{
3030
// Arrange
31-
Mock<ExceptionHandler> mock = new Mock<ExceptionHandler>(MockBehavior.Strict);
31+
Mock<ExceptionHandler> mock = new Mock<ExceptionHandler> { CallBase = true };
3232
Task expectedTask = CreateCompletedTask();
3333
mock.Setup(h => h.ShouldHandle(It.IsAny<ExceptionHandlerContext>())).Returns(true);
3434
mock

test/System.Web.Http.Test/ExceptionHandling/ExceptionLoggerTests.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public class ExceptionLoggerTests
1616
public void LogAsync_IfContextIsNull_Throws()
1717
{
1818
// Arrange
19-
Mock<ExceptionLogger> mock = new Mock<ExceptionLogger>(MockBehavior.Strict);
19+
Mock<ExceptionLogger> mock = new Mock<ExceptionLogger> { CallBase = true };
20+
2021
IExceptionLogger product = mock.Object;
2122

2223
ExceptionLoggerContext context = null;
@@ -30,7 +31,7 @@ public void LogAsync_IfContextIsNull_Throws()
3031
public void LogAsync_IfShouldLogReturnsTrue_DelegatesToLogAsyncCore()
3132
{
3233
// Arrange
33-
Mock<ExceptionLogger> mock = new Mock<ExceptionLogger>(MockBehavior.Strict);
34+
Mock<ExceptionLogger> mock = new Mock<ExceptionLogger> { CallBase = true };
3435
Task expectedTask = CreateCompletedTask();
3536
mock.Setup(h => h.ShouldLog(It.IsAny<ExceptionLoggerContext>())).Returns(true);
3637
mock
@@ -59,7 +60,7 @@ public void LogAsync_IfShouldLogReturnsTrue_DelegatesToLogAsyncCore()
5960
public void LogAsync_IfShouldLogReturnsFalse_ReturnsCompletedTask()
6061
{
6162
// Arrange
62-
Mock<ExceptionLogger> mock = new Mock<ExceptionLogger>(MockBehavior.Strict);
63+
Mock<ExceptionLogger> mock = new Mock<ExceptionLogger> { CallBase = true };
6364
mock.Setup(h => h.ShouldLog(It.IsAny<ExceptionLoggerContext>())).Returns(false);
6465

6566
IExceptionLogger product = mock.Object;

test/System.Web.Http.Test/HttpRouteCollectionTest.cs

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Web.Http.Routing;
77
using Microsoft.TestCommon;
88
using Moq;
9-
using Moq.Protected;
109

1110
namespace System.Web.Http
1211
{
@@ -19,10 +18,10 @@ public void HttpRouteCollection_Dispose_UniquifiesHandlers()
1918
var collection = new HttpRouteCollection();
2019

2120
var handler1 = new Mock<HttpMessageHandler>();
22-
handler1.Protected().Setup("Dispose", true).Verifiable();
21+
handler1.As<IDisposable>().Setup(c => c.Dispose()).Verifiable();
2322

2423
var handler2 = new Mock<HttpMessageHandler>();
25-
handler1.Protected().Setup("Dispose", true).Verifiable();
24+
handler1.As<IDisposable>().Setup(c => c.Dispose()).Verifiable();
2625

2726
var route1 = new Mock<IHttpRoute>();
2827
route1.SetupGet(r => r.Handler).Returns(handler1.Object);
@@ -41,8 +40,8 @@ public void HttpRouteCollection_Dispose_UniquifiesHandlers()
4140
collection.Dispose();
4241

4342
// Assert
44-
handler1.Protected().Verify("Dispose", Times.Once(), true);
45-
handler2.Protected().Verify("Dispose", Times.Once(), true);
43+
handler1.As<IDisposable>().Verify(c => c.Dispose(), Times.Once());
44+
handler2.As<IDisposable>().Verify(c => c.Dispose(), Times.Once());
4645
}
4746

4847
[Fact]

test/System.Web.Http.Test/HttpServerTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ private static IExceptionLogger CreateDummyExceptionLogger()
582582
private static HttpMessageHandler CreateDummyMessageHandler()
583583
{
584584
Mock<HttpMessageHandler> mock = new Mock<HttpMessageHandler>(MockBehavior.Strict);
585-
mock.Protected().Setup("Dispose", ItExpr.IsAny<bool>());
585+
mock.As<IDisposable>().Setup(c => c.Dispose());
586586
return mock.Object;
587587
}
588588

test/System.Web.Http.Test/Routing/DirectRouteProviderContextTests.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ public void CreateBuilderWithResolverAndBuild_Throws_WhenConstraintResolverRetur
4040
Mock<IInlineConstraintResolver> constraintResolver = new Mock<IInlineConstraintResolver>();
4141
constraintResolver.Setup(r => r.ResolveConstraint("constraint")).Returns<IHttpRouteConstraint>(null);
4242

43-
Assert.Throws<InvalidOperationException>(
44-
() => BuildWithResolver(@"hello/{param:constraint}", constraintResolver: constraintResolver.Object),
45-
"The inline constraint resolver of type 'IInlineConstraintResolverProxy' was unable to resolve the following inline constraint: 'constraint'.");
43+
var ex = Assert.Throws<InvalidOperationException>(
44+
() => BuildWithResolver(@"hello/{param:constraint}", constraintResolver: constraintResolver.Object));
45+
Assert.Contains("The inline constraint resolver of type 'ObjectProxy_", ex.Message);
46+
Assert.Contains("' was unable to resolve the following inline constraint: 'constraint'.", ex.Message);
4647
}
4748

4849
[Fact]

test/System.Web.Mvc.Test/Html/Test/RenderPartialExtensionsTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static SpyHtmlHelper Create()
9898
{
9999
ViewDataDictionary viewData = new ViewDataDictionary();
100100

101-
Mock<ViewContext> mockViewContext = new Mock<ViewContext>() { DefaultValue = DefaultValue.Mock };
101+
Mock<ViewContext> mockViewContext = new Mock<ViewContext>();
102102
mockViewContext.Setup(c => c.HttpContext.Response.Output).Throws(new Exception("Response.Output should never be called."));
103103
mockViewContext.Setup(c => c.ViewData).Returns(viewData);
104104
mockViewContext.Setup(c => c.Writer).Returns(new StringWriter());

test/System.Web.Mvc.Test/Test/ControllerActionInvokerTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2463,7 +2463,8 @@ private static ControllerContext GetControllerContext(ControllerBase controller,
24632463
}
24642464
}
24652465

2466-
Mock<ControllerContext> mockControllerContext = new Mock<ControllerContext>() { DefaultValue = DefaultValue.Mock };
2466+
Mock<ControllerContext> mockControllerContext = new Mock<ControllerContext>();
2467+
mockControllerContext.SetupGet(c => c.RouteData).Returns(new RouteData());
24672468

24682469
mockControllerContext.Setup(c => c.HttpContext.Request.ValidateInput()).Callback(() =>
24692470
{

test/System.Web.Mvc.Test/Test/HtmlHelperTest.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1171,8 +1171,10 @@ public static TestableHtmlHelper Create()
11711171
{
11721172
ViewDataDictionary viewData = new ViewDataDictionary();
11731173

1174-
Mock<ViewContext> mockViewContext = new Mock<ViewContext>() { DefaultValue = DefaultValue.Mock };
1174+
Mock<ViewContext> mockViewContext = new Mock<ViewContext>();
11751175
mockViewContext.Setup(c => c.HttpContext.Response.Output).Throws(new Exception("Response.Output should never be called."));
1176+
mockViewContext.SetupGet(c => c.TempData).Returns(new TempDataDictionary());
1177+
mockViewContext.SetupGet(c => c.View).Returns(Mock.Of<IView>());
11761178
mockViewContext.Setup(c => c.ViewData).Returns(viewData);
11771179
mockViewContext.Setup(c => c.Writer).Returns(new StringWriter());
11781180

test/System.Web.Mvc.Test/Test/JsonResultTest.cs

+18-7
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,15 @@ public void NullContentIsNotOutput()
9999
Encoding contentEncoding = Encoding.UTF8;
100100

101101
// Arrange expectations
102-
Mock<ControllerContext> mockControllerContext = new Mock<ControllerContext>();
102+
Mock<ControllerContext> mockControllerContext = new Mock<ControllerContext>(MockBehavior.Strict);
103103
mockControllerContext.SetupGet(c => c.HttpContext.Request.HttpMethod).Returns("POST").Verifiable();
104-
mockControllerContext.SetupSet(c => c.HttpContext.Response.ContentType = contentType).Verifiable();
105-
mockControllerContext.SetupSet(c => c.HttpContext.Response.ContentEncoding = contentEncoding).Verifiable();
104+
105+
// Though most other tests run fine with SetupSet(c => c.HttpContext.Reqsponse.ContentType = ...), this
106+
// one does not. Explicitly ensure Response property is not null.
107+
var response = new Mock<HttpResponseBase>(MockBehavior.Strict);
108+
response.SetupSet(r => r.ContentType = contentType).Verifiable();
109+
response.SetupSet(r => r.ContentEncoding = contentEncoding).Verifiable();
110+
mockControllerContext.SetupGet(c => c.HttpContext.Response).Returns(response.Object);
106111

107112
JsonResult result = new JsonResult
108113
{
@@ -115,6 +120,7 @@ public void NullContentIsNotOutput()
115120

116121
// Assert
117122
mockControllerContext.Verify();
123+
response.Verify();
118124
}
119125

120126
[Fact]
@@ -176,16 +182,21 @@ public void NullMaxJsonLengthDefaultIsUsed()
176182
// Arrange
177183
string data = new String('1', 2100000);
178184

179-
Mock<ControllerContext> mockControllerContext = new Mock<ControllerContext>();
180-
mockControllerContext.SetupGet(c => c.HttpContext.Request.HttpMethod).Returns("POST").Verifiable();
181-
mockControllerContext.SetupSet(c => c.HttpContext.Response.ContentType = "application/json").Verifiable();
185+
Mock<ControllerContext> mockControllerContext = new Mock<ControllerContext>(MockBehavior.Strict);
186+
mockControllerContext.SetupGet(c => c.HttpContext.Request.HttpMethod).Returns("POST");
187+
188+
// Though most other tests run fine with SetupSet(c => c.HttpContext.Reqsponse.ContentType = ...), this
189+
// one does not. Explicitly ensure Response property is not null.
190+
var response = new Mock<HttpResponseBase>(MockBehavior.Strict);
191+
response.SetupSet(r => r.ContentType = "application/json");
192+
mockControllerContext.SetupGet(c => c.HttpContext.Response).Returns(response.Object);
182193

183194
JsonResult result = new JsonResult
184195
{
185196
Data = data
186197
};
187198

188-
// Act & Assert
199+
// Act & Assert
189200
Assert.Throws<InvalidOperationException>(
190201
() => result.ExecuteResult(mockControllerContext.Object),
191202
"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.");

test/System.Web.Mvc.Test/Test/MultiServiceResolverTest.cs

+8-5
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,14 @@ public void CurrentPropagatesExceptionWhenResolverThrowsNonActivationException()
4949
Mock<IDependencyResolver> resolver = new Mock<IDependencyResolver>(MockBehavior.Strict);
5050

5151
// Act & Assert
52-
Assert.Throws<MockException>(
53-
() => MultiServiceResolver.GetCombined<TestProvider>(null, resolver.Object),
54-
"IDependencyResolver.GetServices(System.Web.Mvc.Test.MultiServiceResolverTest+TestProvider) invocation failed with mock behavior Strict." + Environment.NewLine
55-
+ "All invocations on the mock must have a corresponding setup."
56-
);
52+
var ex = Assert.Throws<MockException>(
53+
() => MultiServiceResolver.GetCombined<TestProvider>(null, resolver.Object));
54+
Assert.Equal(
55+
"IDependencyResolver.GetServices(System.Web.Mvc.Test.MultiServiceResolverTest+TestProvider) invocation failed with mock behavior Strict." +
56+
Environment.NewLine +
57+
"All invocations on the mock must have a corresponding setup.",
58+
ex.Message,
59+
ignoreLineEndingDifferences: true);
5760
}
5861

5962
private class TestProvider

0 commit comments

Comments
 (0)