mocking
Unit test for mocking a method called by new class object
I am writing unit test for an existing code which is like this class someClass { public function __construct() { ... }[详细]
2023-04-13 01:45 分类:问答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 分类:问答Best Option for Retrospective application of TDD into C# codebase
I have an existing framework consisting of 5 C# libraries, the framework is well used since 2006 and is the main code base to the majority of my projects. My company wishes to roll out TDD for reasons[详细]
2023-04-12 13:57 分类:问答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 分类:问答Can I patch a Python decorator before it wraps a function?
I have a function with a decorator that I\'m trying test with the help of the Python Mock library. I\'d like to use mock.patch to replace the real decorator with a mock \'bypass\' decorator which just[详细]
2023-04-11 14:47 分类:问答Mocking/stubbing a method that's included from "instance.extend(DecoratorModule)"
I use a decorator module that get\'s included in a model instance (through the \"extends\" method). So for example :[详细]
2023-04-11 14:39 分类:问答Python Mock object with method called multiple times
I have a class that I\'m testing which has as a dependency another class (an instance of which gets passed to the CUT\'s init method).I want to mock out this class using the Python Mock library.[详细]
2023-04-11 13:53 分类:问答Questions about TDD
Environment In my solution I have three projects, they are: Web (Asp.net MVC4) Model (Class library) Test (Test project)[详细]
2023-04-11 08:11 分类:问答NSubstitute intercepting "setter" only property invocation
With NSubstitute, is there any way to capture the value you pass to a property setter? E.g. if I have the following interface:[详细]
2023-04-10 22:30 分类:问答