mocking
To mock or not to mock? [closed]
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.[详细]
2023-03-24 00:54 分类:问答Should I mock out framework classes
I\'m writing a green field project using C# and the .NET framework 4 and since my last application was dogged with a lack of tests and not a very testable design I\'m determined to avoid making the sa[详细]
2023-03-23 22:59 分类:问答A Truncated CreateObject()?
MSDN documentation says: When working with the Entity Framework generated classes, consider using the entity type\'s static CreateObjectName method to create a new[详细]
2023-03-23 22:33 分类:问答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 分类:问答How to write JUnit for Adapter without overcomplicated code?
I have an adapter from I1 to ILogger implemented like this: class BAdapter() implements I1 { void logA() { // nothing }[详细]
2023-03-23 19:09 分类:问答How to unit test referenced property with nhibernate
What\'s the best practice if I\'d like to unit test an entity with a referenced property? BlogEntry is referencing a User object by a foreign key. Right now I\'m using session.Load to avoid an except[详细]
2023-03-23 18:19 分类:问答MockContentResolver in a ServiceTestCase null pointers
I\'m trying to create a Service in a TDD-ish manner and to that end I have created the following test. The service basically polls a Web Service and puts new information into a Content Provider. Since[详细]
2023-03-23 16:03 分类:问答Unit Testing Custom Model Binder - Fake HttpContext Issue
I have the following unit test defined to test my model binder: [TestMethod] public void DateTime_Works() {[详细]
2023-03-23 12:16 分类:问答What is the best way to inject mocked Spring @Autowired dependencies from a unit test?
import org.springframework.beans.factory.annotation.Autowired; class MyService { @Autowired private DependencyOne dependencyOne;[详细]
2023-03-23 08:59 分类:问答Mocking an action with metaClass in Grails
I\'m trying to mock the action overview of a Controller, but it isn\'t working. I tried this ways: MyController.metaClass.overview = { ->[详细]
2023-03-23 06:05 分类:问答
加载中,请稍侯......