So I\'m trying to unit-test a controller method.I\'m using MSTest in VS 2010, and Moq 3.1 Test method:
I\'m getting the exception The type initializer for \'Moq.Mock`1\' threw an exception. using Moq 4.0 I\'ve checked around on a couple of forums and they allude to using the Moq-NoCastle version.I
I\'m using VS Unit Testing Framework and Moq. When a Moq verification fails, I\'ll get a Moq.MockException. In the Test Result开发者_开发问答s window, instead of showing the helpful message inside th
I am working with a faked HttpContext (code provided in the end) and probably I am missing something because I can\'t access TempData collection (forth line of SetFakeControllerContext method). Every
I\'ve been using Moq framework in c# for mocking in unit tests however there is one thing I dont complete understand yet. I have this line of code
I have a typical Silverlight application with a WCF service and I am using slsvcutil.exe to generate the standard client proxy to communicate with the web service. I am trying to write unit tests and
I\'m checkingModelState.IsValid in开发者_如何学C my controller action method that creates an Employee like this:
I\'m trying to define a return value for a Mock (model). Can anyone explain to me why the following code fails with a \"Invalid setup on a non-overridable member\":
In my unit-tests I\'m mocking a protected method using Moq, and would like to assert that it is called a certain number of times. This question describes something similar for an earlier version of Mo
I have following xaml code: <Window x:Class=\"MainWindow\" xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"