Top "Moq" questions

Moq is a strongly typed and minimalistic mocking framework for .NET.

How to mock RestSharp portable library in Unit Test

I would like to mockup the RestClient class for test purposes public class DataServices : IDataServices { private readonly IRestClient _restClient; public …

c# unit-testing xamarin moq restsharp
Type name could not be resolved. Please check config file

Trying to unit test my application using moq and unity, and I'm getting errors where my service is an interface …

unit-testing unity-container moq unity2.0
What is the DynamicProxyGenAssembly2 assembly?

I use Moq for my unit tests. To test internal interfaces I have to declare the InternalsVisibleTo attribute to the …

unit-testing moq obfuscation
How to test asp.net core built-in Ilogger

I want to verify some logs logged. I am using the asp.net core built-in ILogger, and inject it with …

c# unit-testing logging asp.net-core moq
Using Moq to verify execution of private methods

I want to test the following logic (this is obviously a stripped-down version of my method): public void myPublicMethod(params) { …

unit-testing mocking moq private-members
Moq callback with out parameter

I'm trying to use Moq to mock a callback for the following method signature: ResponseHeader AddIncentives( Hs_transRow[] data, out …

c# unit-testing callback moq out
How to mock a method with an out parameter?

I am using a library that uses out parameters in a function and I need to test my code using …

c# unit-testing mocking moq fluentvalidation
How to use Moq to mock up the StackExchange.Redis ConnectionMultiplexer class?

I am working to mock up behaviors related to the StackExchange.Redis library, but can't figure out how to properly …

c# .net unit-testing moq stackexchange.redis
Need some advice for trying to mock a .NET WebClient or equivalent

I've got some code which downloads some RSS feeds. I've been using WebClient or Argotic.Syndication.RssFeed libraries. But these …

c# .net mocking moq webclient
ASP.NET MVC Controller Unit Testing - Problem with UrlHelper Extension

Trying to do some controller unit-testing in my ASP.NET MVC 3 web application. My test goes like this: [TestMethod] public …

c# asp.net-mvc unit-testing moq asp.net-mvc-routing