mocking
Do I really have to do write my code differently so just so I can test it?
I am coming to c# from ruby on rails where I did TDD using Rspec and Mocha. I was looking to get into get into a mocking framework and an older stackoverflow post pointed me in the direction of MOQ an[详细]
2023-04-06 17:35 分类:问答It.IsAny<Cart>(), It.IsAny<ShippingDetails>(), Times.Never(). What do they do?
I wonder if you could help me understand the following line: mock.Verify(m => m.ProcessOrder(It.IsAny<Cart>(),[详细]
2023-04-06 17:16 分类:问答PHPUnit - test autoloader class
I need to create an autoloader to my 开发者_如何转开发application. I don\'t want to depend on a file in the filesystem, so how do I mock a new call? Or how do you test an autoloader class?[详细]
2023-04-06 09:34 分类:问答Mocking, virtual and more
This question would have been asked many times w.r.t to RhinoMocks, but I will try to present a little differently. I have a situation like this below -[详细]
2023-04-06 08:26 分类:问答how do you provide deep mock objects?
I don\'t think I understand testing as well a should. I have written a lot of tests and gotten decent coverage but I cann开发者_如何学JAVAot help feeling it has not been intuitive.[详细]
2023-04-06 05:44 分类:问答How to add a fake EF4 Rerefence with AutoFixture ( or without if possible )
I have the following code: public class FakeOrderRepository:IOrderRepository { private static Fixture fixture = new Fixture();[详细]
2023-04-06 03:09 分类:问答Unit testing EF4 Repository Code
What\'s 开发者_如何学Ca good approach for writing unit tests for the following GetMyObjectsFiltered(...) method in a EF4 repository:[详细]
2023-04-05 21:34 分类:问答Problem with Registering Mock objects with Unity
I have a named registration like this: Unity.Container.RegisterType<IScheduler, DailyScheduler>(\"Daily\");[详细]
2023-04-05 19:01 分类:问答TDD: Test MVC application
I\'ve started from scratch a new application using TDD and PHPUnit. It is going to be a MVC application. I\'ve started my tests from the Model. That was fun and i didn\'t have too much problems.[详细]
2023-04-05 16:28 分类:问答PHPUnit: expects method meaning
When I create a new mock I need to call the expects method. What exactly it does? What about its arguments?[详细]
2023-04-05 07:00 分类:问答