Example #1
0
 public TinyUrlControllerTests()
 {
     _controller = new TinyUrlController(new TinyUrlService(
                                             new Repository <UrlMap, string>(new AppDbContext(Options)),
                                             new ConfigurationRoot(new List <IConfigurationProvider>()), new HttpContextAccessor(),
                                             new Repository <HitLog, string>(new AppDbContext(Options))));
 }
 public TinyUrlControllerSteps()
 {
     this.tinyUrlService  = new Mock <ITinyUrlService>();
     this.mockHttpRequest = new Mock <HttpRequestMessage>();
     this.controller      = new TinyUrlController(this.tinyUrlService.Object)
     {
         Request       = mockHttpRequest.Object,
         Configuration = new HttpConfiguration(),
     };
 }