G
o
o
g
l
e
×
Please click
here
if you are not redirected within a few seconds.
All
Images
Videos
News
Maps
Shopping
Books
Search tools
Recent
Recent
Past hour
Past 24 hours
Past week
Past month
Past year
Archives
Sorted by relevance
Sorted by relevance
Sorted by date
c# - How to properly mock HttpContextAccessor with Request.Form for controller testing in .NET 6
Stack Overflow
In your MockHttpContextAccessor() constructor you do the following: var context = new DefaultHttpContext(features); fileCollection = new...
6 months ago
c# - How to fix Package source mapping is off in Visual Studio 2022?
Stack Overflow
Make the package pattern * only, and the source https://api.nuget.org/v3/index.json.
11 months ago
c# - Unable to get Default Constructor
Stack Overflow
I've just tested this in my unit tests. Add public PersonRegistration() { }. And it should run fine. There is no need for constructors on...
90 months ago
Unsupported expression: Non-overridable members (here: ) may not be used in setup / verification expressions
Stack Overflow
The moq use dynamic proxy to create wrapper around mocked type in order to be able to intercept calls and change the behaviour of the...
64 months ago
moq - unit test mock imediator for cqrs
Stack Overflow
Looking at the way you set your initial mocks, I understand that you are passing in a mocked Mediator to your handler.
51 months ago
c# - Moq - Non-overridable members may not be used in setup / verification expressions
Stack Overflow
If a class has members that can't be overridden (they aren't virtual, abstract) then Moq can't override them to add its own behaviors.
64 months ago
c# - setting up a moq to mock a complex type using It.IsAny
Stack Overflow
Have a look at the place where the new keyword is used in the method InitializeDeviceStatus . Here because new is used the mocking is not...
106 months ago
c# - Unit Testing WCF Service using Moq
Stack Overflow
Looks like you are missing a reference to System.ServiceModel. But your test doesn't actually test anything, except maybe that mocking works...
75 months ago