Last active
December 28, 2017 01:32
-
-
Save MrCoder/9159fef8244b72331b49772920285490 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// API client interface | |
public interface IMyApiClient | |
{ | |
[Get("/status")] | |
Task<string> GetStatus(); | |
} | |
// Test code | |
[Fact] | |
public async Task Get_status() | |
{ | |
var myApiClient = RestService.For<IMyApiClient>("http://localhost:1080"); | |
var status = await myApiClient.GetStatus(); | |
Assert.Equal("OK", status); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment