Last active
August 29, 2015 14:13
-
-
Save devdays/64be2dcd7677514af80f to your computer and use it in GitHub Desktop.
Alternative way to implement Service, but will not compile
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 | |
{ | |
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