nmock
NUnit and NMock- ExpectAndReturn - How to tell NMock to expect CreateObjectSet<T>
I have the following var objSet = new DynamicMock(typeof(IObjectSet<Nationality>)); objSet.ExpectAndReturn(\"GetAll\", new List<Nationality>[详细]
2023-04-09 16:07 分类:问答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 分类:问答ambiguous references when mixing NUnit and NMock2 matchers
We\'re using NUnit (2.5.9) and NMock2 for unit testing and mocking. Both, however, have a matcher syntax that closely corresponds. When I do[详细]
2023-02-19 03:56 分类:问答NMock - How to make a method with same argument types return different values?
I\'ve a method like this: public string MyMethod(string a, string b) { if(a == \"abcd\" && b == \"xyz\")[详细]
2023-01-29 06:09 分类:问答Using nMoq, how would one expect for a given Event?
Let\'s say I want to make a Unit-Test where I have this Tetris game and I want to start the game, do nothing, and wait for the game to be over (this is, to get a GameOver event):[详细]
2023-01-08 12:30 分类:问答How to assert a private method on concrete class is called (TypeMock/NMock/etc..)?
I am trying to write a unit test for the \'IsUnique\' function in the class below that looks like this:[详细]
2022-12-21 09:56 分类:问答Mocking help?I can't find what's the problem
I have an interface definded like this: public interface IDatabase{ void Get<TTypeToFetch> ();} and when I try to do:[详细]
2022-12-20 16:16 分类:问答Differences between NMock 2.0 and NMock2
I am a bit confused over which version of NMock2 I should use. The one I\'ve been using for a while I got from here:[详细]
2022-12-14 10:06 分类:问答NMock - how to say expect 'any value' on these params? Or should I not do this?
开发者_StackOverflowI have a quick question that I could not figure out in the docs about NMock2.0.[详细]
2022-12-14 03:33 分类:问答