moq
HttpFileCollectionBase: Mocking Count-Property
I try to mock the Count-Property of an instance of HttpFileCollectionBase - but somehow it doesn\'t work.[详细]
2023-03-21 03:44 分类:问答MVC moq with repository that uses lambda expression
I have a controller method that acceses a repository method which has lambda expression as parameter:[详细]
2023-03-20 07:08 分类:问答Verify method call with Lambda expression - Moq
I have a Unit of Work implementation with, among others, the following method: T Single<T>(Expression<Func<T, bool>> expression) where T : class, new();[详细]
2023-03-19 16:01 分类:问答How do I resolve this Moq error? System.Reflection.TargetParameterCountException : Parameter count mismatch
I am using Moq in my nUnit test cases. Here\'s what my test case looks like: IList<ChartFieldDepartment> coaDepartments = new List<ChartFieldDepartment>() {[详细]
2023-03-19 15:20 分类:问答MVC 3: How to learn how to test with NUnit, Ninject, and Moq?
Short version of my questions: Can anyone point me toward some good, detailed sources from which I can learn how to开发者_如何学JAVA implement testing in my MVC 3 application, using[详细]
2023-03-19 12:08 分类:问答How can I call setup in Moq twice in one method?
I have a unit test method that needs to mock (stub?) two repository method calls in the class that I\'m testing.Every example I\'ve worked through until now shows one setup method for the Mock, but no[详细]
2023-03-19 12:04 分类:问答Moq testing LINQ Where queries
I\'m using EF 4.1 to build a domain model. I have a Task class with a Validate(string userCode) method and in it I want to ensure the user code maps to a valid user in the database, so:[详细]
2023-03-19 11:52 分类:问答ASP.NET HttpException.GetHttpCode() returns 0
Short Version: If I create a System.Web.HttpException as follows: var exception = new HttpException(403, \"Forbidden\");[详细]
2023-03-19 02:58 分类:问答Mocked method returns null
I have a simple test method in my Silverlight project: [TestMethod] [Tag(\"User\")] public void ViewModel_NewUserAdded_DefaultCulturesLoaded()[详细]
2023-03-19 00:23 分类:问答Cannot mock a method call in a ASP.NET MVC Controller using Moq
I have the following code in a \"UserController\" within my ASP.NET MVC application: public class UserController : Controller[详细]
2023-03-18 22:25 分类:问答