Created
January 17, 2015 21:20
-
-
Save devdays/cf2571a4f9758dda4076 to your computer and use it in GitHub Desktop.
Alternative implementation of the Service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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