public void SetUp()
    {
      ReferenceManager = Substitute.For<IReferenceManagement>();
      UsersManager = Substitute.For<IUsersManagement>();
      AppraiserManager = Substitute.For<IAppraiserManagement>();
      Context = MockHttpContext.FakeHttpContext();

      Target = new AppraiserAccessManager(ReferenceManager, UsersManager, AppraiserManager, Context, Substitute.For<ISecurityContext>());
    }
		public void SetUp()
		{
			UsersManagement = Substitute.For<IUsersManagement>();
			ReferenceManager = Substitute.For<IReferenceManagement>();
			AppraiserManager = Substitute.For<IAppraiserManagement>();
			TaskManager = Substitute.For<ITaskManager>();
			ViewContext = new ViewContext();
			ViewContext.HttpContext = MockHttpContext.FakeHttpContext();
			CurrentUserLogin = "******";
			User = new GenericPrincipal(new GenericIdentity(CurrentUserLogin), null);
			var securityContextService = new SecurityContextService(UsersManagement, ViewContext.HttpContext, AppraiserManager, Substitute.For<IDVSUserManager>(), Substitute.For<IClientUserManager>());
			AppraiserAccessManager = new AppraiserAccessManager(ReferenceManager, UsersManagement, AppraiserManager, ViewContext.HttpContext, securityContextService);
				

			Target = new UserChangePasswordController(UsersManagement, AppraiserAccessManager, TaskManager);
			Target.CommitProviderInstance = Substitute.For<ICommitProvider>();
			ViewContext.HttpContext.User.ReturnsForAnyArgs(User);
			Target.SetFakeControllerContext(ViewContext.HttpContext);
			Target.ModelState.Add(new KeyValuePair<string, ModelState>("OldPassword", new ModelState()));

			UsersManagement.GetByEmail(CurrentUserLogin).Returns(new User());
		}