Created
July 18, 2016 13:19
-
-
Save humblelistener/3affc2195560c3ecaa3b64e767d13e6e 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
| public class ProviderA : Controller | |
| { | |
| public static Dictionary<string, object> Called = new Dictionary<string, object>(); | |
| [Route("api/list/{status}")] | |
| public IEnumerable<Product> Get(string status = "") | |
| { | |
| var results = new List<Product> {Mockery.Message}; | |
| Called["get"] = status; | |
| return results; | |
| } | |
| [HttpPut, Route("api/product/{id}")] | |
| public IActionResult Put(int id, Product request) | |
| { | |
| Called["put"] = request; | |
| return new NoContentResult(); | |
| } | |
| [HttpGet, Route("api/verify/{key}")] | |
| public object Verify(string key) | |
| { | |
| return new | |
| { | |
| Called = Called.ContainsKey(key), | |
| Message = Called[key] | |
| }; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment