mocking
Rhino Mocks: Stub & Mocks. What is the difference
I\'m using Rhino Mocks in my unit test. I would like to know the difference between STUBS and MOCKS (mocks.Stub<T>() andmocks.StrictMock<T&g开发者_如何转开发t;()).I think it had been asked b[详细]
2023-04-01 18:22 分类:问答How to mock the Django Model.save() function in python?
I\'m using the mock library and I want to be able to mock the save() function of my model class in the following way:[详细]
2023-04-01 07:26 分类:问答How to mock Rails::configuration
I\'m attempting to test a class whic开发者_开发问答h makes use of the rails configuration file.I\'d like to mock Rails::configuration.[详细]
2023-04-01 05:51 分类:问答Testing a whole page redirect in qUnit
I have the following function var redirect = function() { window.location.href = \"http://www.google.com\";[详细]
2023-03-31 12:20 分类:问答How to mock a Model in MVC3 when using Rhino Mocks
I am new to Rhino Mocks. I have several models. One of them is as below. I want to use Rhino Mocks. I downloaded the latest Rhino.Mocks.dll and added it to my testharness project. How do I mock my mod[详细]
2023-03-31 08:44 分类:问答Issue with Mock repository
I have a service containing the following method, which queries a repository, like so: public IEnumerable<Variable> ListVariables(int instanceId, int instanceVersionId, TypeGroup typeGroup)[详细]
2023-03-31 06:28 分类:问答Specify the class of a generic interface to mock
I\'m trying to cap开发者_运维知识库ture an argument using Mockito.This argument is of type List< MyClass >.But I can\'t find the proper syntax to specify it.[详细]
2023-03-31 06:12 分类:问答Expecting anything as parameter to mock using EasyMock
Using EasyMock I want to be able to say that I expect a specific method called on my mock, but I do not care about the parameter which are used to call the mock.[详细]
2023-03-31 05:08 分类:问答Conditional mocking using NMock
i wonder if someone is able to help me with my problem. I have to stub a method which is able to perform conditional mocking.[详细]
2023-03-29 13:35 分类:问答How do I stub away send_file using mocha
The most direct attempt is to do @controller.stubs(:send_file) But that results in an output error like[详细]
2023-03-29 05:18 分类:问答