public static SmsController GetInitialisedSmsController(IInternalSmsService internalSmsService) { var controller = new SmsController(internalSmsService) { Request = new HttpRequestMessage {RequestUri = new Uri("http://localhost/api/")}, Configuration = new HttpConfiguration() }; controller.Configuration.MapHttpAttributeRoutes(); controller.Configuration.EnsureInitialized(); return controller; }
public SmsController(IInternalSmsService smsService) { Check.If(smsService).IsNotNull(); _smsService = smsService; }