Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
namespace MoqTest
{
using System;
using Moq;
public interface IMockMe
{
string HelloWorld<T> ();
}
class MainClass
{
public static void Main (string[] args)
{
var mock = new Mock<IMockMe> ();
mock.Setup (x => x.HelloWorld<string> ()).Returns ("Hello World");
Console.WriteLine (mock.Object.HelloWorld<string> ());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment