You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 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
Copy file name to clipboardExpand all lines: test/System.Web.Http.Test/Dispatcher/DefaultHttpControllerActivatorTest.cs
+4-2
Original file line number
Diff line number
Diff line change
@@ -152,8 +152,10 @@ public void Create_ThrowsForNullDependencyScope()
152
152
"An error occurred when trying to create a controller of type 'SimpleController'. Make sure that the controller has a parameterless public constructor.",
153
153
exception.Message);
154
154
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.",
"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.");
0 commit comments