Skip to content

Instantly share code, notes, and snippets.

@rudism
Created May 11, 2015 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rudism/497970d4d189af9857c2 to your computer and use it in GitHub Desktop.
Save rudism/497970d4d189af9857c2 to your computer and use it in GitHub Desktop.
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