Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save humblelistener/3affc2195560c3ecaa3b64e767d13e6e to your computer and use it in GitHub Desktop.
Save humblelistener/3affc2195560c3ecaa3b64e767d13e6e to your computer and use it in GitHub Desktop.
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