protected HostsController CreateController(long userId, string role)
 {
     return(new HostsController(this.mediatorMock.Object, this.authServiceMock.Object)
     {
         ControllerContext = ControllerContextFactory.CreateContext(userId, role)
     });
 }
 protected AccountController GetAuthenticatedController(long userId = 1, string role = RoleNames.Administrator)
 {
     return(new AccountController(this.authServiceMock.Object, this.mediatorMock.Object)
     {
         ControllerContext = ControllerContextFactory.CreateContext(userId, role)
     });
 }
Exemple #3
0
 protected ApartmentsController CreateController()
 {
     return(new ApartmentsController(this.mediatorMock.Object, this.authServiceMock.Object)
     {
         ControllerContext = ControllerContextFactory.CreateContext()
     });
 }