Geeks With Blogs

News Forms Justin Hoffman
Justin Hoffman May 2012 Entries
Self Host Web Api's for Integration Testing
Recently I had a need to write some tests making Web Api calls that would be deployable to the build server without any special configuration.What I did was utilize the Self Hosting feature in the Asp.NetWebApi. First, I created a simple Api controller . // GET /api/values public class ValuesController : ApiController { public SomeObjects GetByName(string firstName, string lastName) { var someObjects= new List<SomeObject>() { new SomeObject { FirstName = "Tom", LastName = "Jones", Id= 1213 ......

Posted On Wednesday, May 16, 2012 11:27 AM

Copyright © Justin Hoffman | Powered by: