I code a FTP client Application, testing my functions by nunit tool. I try to mock FTP data stream. GetAllCsvFilesFromFTP method call FtpConnect() method, but while testing I want to get a Stream data
I have a service containing the following method, which queries a repository, like so: public IEnumerable<Variable> ListVariables(int instanceId, int instanceVersionId, TypeGroup typeGroup)
I have been trying to get Moq (or rather Castle.Core) to create proxies for my internal types. The following (when added to my project under test), allows things to work:
I was wondering how you could mock that a controller is decorated with the [Authorize] attribute in MVC3? I am using a custom membership provider. I would like to test that a controller been decorated
I\'m trying to use Moq on a Mono / .NET 3.5 Project using MonoDevelop for MacOS X I\'ve tried the sample C# code:
I spent an evening trying to mock an object that implements IQueryable: public interface IRepo<T> : IQueryable<T>
What\'s th开发者_开发问答e most succinct way to use Moq to mock a method that will throw an exception the first time it is called, then succeed the second time it is called?I would make use of Callbac
Hi I am getting an error and I don\'t understand why [SetUp] public void Setup() { visitService = new Mock<IVisitService>();
We have several places in our code-base where we do something similar to the following: DataTable dt = new DataTable();
I\'m using the following logic (MOQ) to attempt to mock out the MongoDB csharp driver objects: var svr = new Mock<MongoServer>(new MongoServerSettings());