moq
Mocking HttpContext in MVC **Outside** of the Controller
Scenario We\'re developing a new MVC web project and we\'re trying to adhere to the Skinny Controller pattern as described in this article http://codebetter.com/iancooper/2008/12/03/the-fat-controlle[详细]
2023-03-25 02:21 分类:问答Testing ria services authentication with moq
I\'m using RIA Services authentication in a Silverlight app and it works great. Now I want to add unit tests using Moq framework: http://code.google.com/p/moq/[详细]
2023-03-24 16:49 分类:问答Mock File.Exists method in Unit Test (C#) [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: .NET file system wrapper library[详细]
2023-03-23 23:35 分类:问答Moq mocking a class
I\'m new to Moq and mocking. I have a class Car and I want to Mock this class: Car car = Mock<Car>();[详细]
2023-03-23 20:56 分类:问答MOQ - LINQ Predicates in Setup Method
In my method, I have my repository doing this: bool isConditionMet = MyRepository.Any(x => x.Condition == true);[详细]
2023-03-23 15:28 分类:问答How to mock Subsonic Dataset that is coming out of the Stored proc?
I am looking for code samples to mock dataset after stored proc call using Subsonic. Here is my method.[详细]
2023-03-23 03:28 分类:问答Define method implementation in mock object using Moq
This is the situation. I had async call so I needed to make Mid tier for this in order to be able to test it.[详细]
2023-03-22 21:04 分类:问答Moq confusion - Setup() v Setup<>()
I have a mock being created like this: var mock = new Mock<IPacket>(MockBehavior.Strict); mock.Setup(p => p.GetBytes()).Returns(new byte[开发者_JAVA百科] { }).Verifiable();[详细]
2023-03-22 06:01 分类:问答Mock UdpClient for unit testing
I am working on a class that utilises a UdpClient, and attempting to learn/utilise a TDD approach using NUnit and Moq in the process.[详细]
2023-03-22 03:06 分类:问答How do I use Moq to test calls to NServiceBus IBus.Publish()?
The following code compiles, runs, does exactly what I\'m expecting - the GreetingPublisher calls bus.Publish() when the event is raised - but the Moq setup isn\'t being matched:[详细]
2023-03-21 11:28 分类:问答