Ejemplo n.º 1
0
 private void InitFakes()
 {
     mockPeepService = Mock.Of <IPeepService>(
         p => p.GetPeeps(It.IsAny <string>()) == testPeeps);
     stubRequest = Mock.Of <HttpRequestBase>(
         r => r.Headers == new System.Net.WebHeaderCollection {
         { "X-Requested-With", "XMLHttpRequest" }
     } &&
         r.Form == testForm);
     stubContext = Mock.Of <HttpContextBase>(
         c => c.Request == stubRequest);
 }
Ejemplo n.º 2
0
 private void InitFakes()
 {
     mockPeepService = Mock.Of <IPeepService>(
         p => p.GetPhoto(It.IsAny <int>()) == testImageBytes);
 }
Ejemplo n.º 3
0
 public HomeController(IPeepService peepService)
 {
     this.peepService = peepService;
 }
Ejemplo n.º 4
0
 public ImageController(IPeepService peepService)
 {
     this.peepService = peepService;
 }