I have a scenario where the code under test inserts a record into a database, then attempts to retrieve it back from the database using its primary key.
I can\'t find an example of the usage of the When method in Moq When(Func<bool> condition); What is the purpose/usage of the method? Please give a cod开发者_JAVA百科e sample demonstrating a s
It came to my attention lately that you can unit test abstract base classes using Moq rather than creating a dummy class in test that implements the abstract base class. See How to use moq to test a c
I\'m tring to use a lambda with a multiple-params function but Moq throws this exception at runtime when I attempt to call the mock.Object.Convert(value, null, null, null); line.
I\'m struggling to write a test that confirms that I am correctly unsubscribing from an EventAggregator\'s message when it is closed. Anyone able to point out the (simple) answer?!
A bit of code: public interface IMyInterface { in开发者_运维问答t GetIt(); } public class MyImplementation : IMyInterface
I have a factory that looks like below: public IFoo GetFoo(IFile file开发者_Go百科) { return _kernel.Get<IFoo>(new ConstructorArgument(\"file\", file));
I donwloaded Moq.4.0.10827开发者_JS百科 from www.code.google.com/p/moq and trying to add reference to Moq.4.0.10827\\NET40\\Moq.dll to Visual Studio 2010 C# project. Trying to build this project, I se
I have Silverligth Unit test Application (.net 4.0) and I\'ve added reference to my WCF service(3.5) And here are my codes
I\'ve had a look around at other questions, but nothing really matches what I\'m looking for... mainly because I\'m not 100% certain on what it is I\'m looking for!