Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Alternative way to implement Service, but will not compile
class AlternateService
{
public void Serve()
{
Console.WriteLine("Service Called");
//To Do: Some Stuff
}
}
class TestClient
{
public static Main()
{
// will not 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
You can’t perform that action at this time.