Top "Moq" questions

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

Mocking Asp.net-mvc Controller Context

So the controller context depends on some asp.net internals. What are some ways to cleanly mock these up for …

asp.net-mvc unit-testing mocking moq rhino-mocks
Is it possible to mock out a .NET HttpWebResponse?

i've got an integration test that grabs some json result from a 3rd party server. It's really simple and works …

c# .net unit-testing mocking moq
Moq - Non-overridable members may not be used in setup / verification expressions

I'm new to Moq. I'm mocking a PagingOptions class. Here is how the class looks like: public class PagingOptions { [Range(1, 99999, …

c# .net moq
Proper way to Mock repository objects for unit tests using Moq and Unity

At my job we are using Moq for mocking and Unity for an IOC container. I am fairly new to …

c# .net moq unity-container
How do you use Moq to mock a simple interface?

Okay, I have a business logic class like this: Note: For context, Vendor Briefs are simple entities that describe a "…

c# unit-testing dependency-injection mocking moq
What is the purpose of Verifiable() in Moq?

What is the purpose of Verifiable()? If I verify a Mock and leave this out it still verifies the SetUp. …

moq
Mock static property with moq

I am pretty new to use moq. I am into creating some unit test case to HttpModule and everything works …

c# asp.net unit-testing moq
Moq - mock.Raise should raise event in tested unit without having a Setup

I have a presenter class, that attaches an event of the injected view. Now I would like to test the …

c# events tdd moq mvp
Moq - How to verify that a property value is set via the setter

Consider this class: public class Content { public virtual bool IsCheckedOut {get; private set;} public virtual void CheckOut() { IsCheckedOut = true; } public …

c# .net mocking tdd moq
How do you mock the session object collection using Moq

I am using shanselmann's MvcMockHelper class to mock up some HttpContext stuff using Moq but the issue I am having …

asp.net-mvc unit-testing tdd moq