Example #1
0
 public void Init()
 {
     Repo = new Mock<Repository<User>>();
     FormsAuth = new Mock<IFormsAuthService>();
     Controller = new UserController(Repo.Object,FormsAuth.Object);
     User = new NewUserNoChildrenFixture().GetInstance();
     LoginInput = new LoginInputNewUserNoChildrenFixture().GetInstance();
     RegisterInput = new RegisterInputCompleteFixture().GetInstance();
     AuthService = new UserAuthService(User,Repo.Object);
 }
 public void Init()
 {
     Repo = new Mock<IRepository<User>>();
     Auth = new Mock<IAuthenticationService>();
     Controller = new UserController(Repo.Object, Auth.Object);
     Context = new Mock<HttpContextBase>(MockBehavior.Strict);
     Response = new Mock<HttpResponseBase>();
     Response.SetupGet(x => x.Cookies).Returns(new HttpCookieCollection());
     Context.SetupGet(x => x.Response).Returns(Response.Object);
     Controller.ControllerContext = new ControllerContext(Context.Object, new RouteData(), Controller);
 }