Skip to content

Instantly share code, notes, and snippets.

@devdays
Created January 17, 2015 21:20
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 devdays/cf2571a4f9758dda4076 to your computer and use it in GitHub Desktop.
Save devdays/cf2571a4f9758dda4076 to your computer and use it in GitHub Desktop.
Alternative implementation of the Service
class AlternateService :IService
{
public void Serve()
{
Console.WriteLine("Service Called");
//To Do: Some Stuff
}
}
class TestClient
{
public void Main(string[] args) {
// Will compile. Cannot mock out the alternate service
Client client = new Client(new AlternateService());
client.Start();
Console.ReadKey();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment