Moq is a strongly typed and minimalistic mocking framework for .NET.
I have a Transfer class, simplified it looks like this: public class Transfer { public virtual IFileConnection source { get; set; } public …
c# unit-testing mocking moqI have an object I'm trying to mock using moq. The object's constructor has required parameters: public class CustomerSyncEngine { public …
moqI am testing a method for a service that makes a Web API call. Using a normal HttpClient works fine …
c# unit-testing asynchronous moqI'm trying to create a unit test for my service with a mocked DbContext. I created an interface IDbContext with …
c# unit-testing entity-framework-5 moq dbcontextI have a test like this: [TestCase("~/page/myaction")] public void Page_With_Custom_Action(string path) { // Arrange var pathData = …
c# unit-testing nunit moqIt is my understanding that I can test that a method call will occur if I call a higher level …
c# .net unit-testing mocking moqImagine this class public class Foo { private Handler _h; public Foo(Handler h) { _h = h; } public void Bar(int i) { _…
c# moqI have a controller in C# using the ASP.Net MVC framework public class HomeController:Controller{ public ActionResult Index() { if (…
asp.net-mvc unit-testing mocking rhino-mocks moqUsing Moq and looked at Callback but I have not been able to find a simple example to understand how …
.net moqWith Moq, is it valid to have more than one Matching Argument? It.Is<string>() In this example …
c# unit-testing mocking moq