Top "Moq-3" questions

Moq (pronounced "Mock-you" or just "Mock") is a mocking framework for .NET that makes heavy use of lambdas and LINQ expression trees.

Verify value of reference parameter with Moq

I just switched to Moq and have run into a problem. I'm testing a method that creates a new instance …

c# mocking tdd moq-3
When using Moq Verify() method invocation count, have failing test's error message contain actual method invocation count using Moq

Consider the following, where I am testing that an injected dependency's method is called a specific number of times: [Fact] …

unit-testing mocking moq moq-3
how do you mock an xml for unit testing?

I need to unit testing this GetData method. public MessageResponse GetData(XmlElement requestElement) { MessageResponse MsgResponse = new MessageResponse(); if (requestElement.Attributes["…

unit-testing moq mstest moq-3
How to Mock ILogger / ILoggerService using Moq

I'm writing some unit tests for my View Model class. The constructor of this class is injected with an ILoggerService. …

c# unit-testing prism moq moq-3
How to mock config file for unit test

I have a class in which there is a parameter less constructor. But when this constructor is called, there are …

unit-testing c#-4.0 moq moq-3