rhino-mocks
Stub a property which is in the concrete class but not on the interface for unit testing
I have a class which has more information then my inteface. It has a property which I did not expose in my interface.[详细]
2023-04-12 20:36 分类:问答fake DataRepository - emulating the database
Quick Info: I\'m using C# 4.0 and RhinoMocks (with AAA) I\'ll explain with some code what I\'m thinking about doing:[详细]
2023-04-12 14:23 分类:问答How can I check if a particular property setter is called on a Mock object?
F开发者_C百科or the given mock object below, how can I check if the WashCar(ICar car) method is setting the TiresWashed property?[详细]
2023-04-12 09:54 分类:问答How can I check a method is called with a specific parameter on a mock object?
Can you help to achieve the goal I mentioned in the commented block below to complete sample unit test?[详细]
2023-04-12 03:32 分类:问答Do I need to explicitly set expected return values on Mock object only?
Is my observation correct: public intercafe IMyInterface { bool IsOK {get;set;} } // If I use stub this always return true:[详细]
2023-04-11 18:48 分类:问答Rhino mock calling the function that is mocked
Trying to mock a function with RhinoMock. var repository = new Rhino.Mocks.MockRepository(); var classMock = repository.DynamicMock<Customer>();[详细]
2023-04-11 08:45 分类:问答Mocking HttpContext to retrieve item form contexts item dictionary
We use MVC3, for our unit tests we use RhinoMocks in our unit tests. When the a request starts we check the domain from which it came and match that to a customer.[详细]
2023-04-09 11:17 分类:问答assert property of mocked object has been assigned correctly using Rhino.Mocks
In a (web) application I\'ve implemented the MVP pattern for seperation of core concerns. My presenters directly query the database using LINQ-to-NHibernate, or sometimes they use query objects when t[详细]
2023-04-09 02:47 分类:问答How to test HtmlHelpers that call Partial?
I\'ve been looking at this Stackoverflow question and have the answer implemented.It works all fine and dandy until I get to call HtmlHelper.Partial in my helper method, which is listed below. I know[详细]
2023-04-08 21:56 分类:问答Is it possible to mock a type with an attribute using Rhino.Mocks
I have this type: [RequiresAuthentication] public class MobileRunReportHandler : IMobileRunReportHandler[详细]
2023-04-08 21:39 分类:问答