public void SetUp() { userRepository = new Mock<IUserRepository>(); userProfileRepository = new Mock<IUserProfileRepository>(); followRequestRepository = new Mock<IFollowRequestRepository>(); followUserRepository = new Mock<IFollowUserRepository>(); securityTokenRepository = new Mock<ISecurityTokenRepository>(); unitOfWork = new Mock<IUnitOfWork>(); userService = new UserService(userRepository.Object, unitOfWork.Object, userProfileRepository.Object); userProfileService = new UserProfileService(userProfileRepository.Object, unitOfWork.Object); followRequestService = new FollowRequestService(followRequestRepository.Object, unitOfWork.Object); followUserService = new FollowUserService(followUserRepository.Object, unitOfWork.Object); securityTokenService = new SecurityTokenService(securityTokenRepository.Object, unitOfWork.Object); controllerContext = new Mock<ControllerContext>(); contextBase = new Mock<HttpContextBase>(); httpRequest = new Mock<HttpRequestBase>(); httpResponse = new Mock<HttpResponseBase>(); genericPrincipal = new Mock<GenericPrincipal>(); httpSession = new Mock<HttpSessionStateBase>(); authentication = new Mock<IFormsAuthentication>(); identity = new Mock<IIdentity>(); principal = new Mock<IPrincipal>(); tempData = new Mock<TempDataDictionary>(); file = new Mock<HttpPostedFileBase>(); stream = new Mock<Stream>(); accountController = new Mock<AccountController>(); }
public void SetUp() { userRepository = new Mock <IUserRepository>(); userProfileRepository = new Mock <IUserProfileRepository>(); followRequestRepository = new Mock <IFollowRequestRepository>(); followUserRepository = new Mock <IFollowUserRepository>(); securityTokenRepository = new Mock <ISecurityTokenRepository>(); unitOfWork = new Mock <IUnitOfWork>(); userService = new UserService(userRepository.Object, unitOfWork.Object, userProfileRepository.Object); userProfileService = new UserProfileService(userProfileRepository.Object, unitOfWork.Object); followRequestService = new FollowRequestService(followRequestRepository.Object, unitOfWork.Object); followUserService = new FollowUserService(followUserRepository.Object, unitOfWork.Object); securityTokenService = new SecurityTokenService(securityTokenRepository.Object, unitOfWork.Object); controllerContext = new Mock <ControllerContext>(); contextBase = new Mock <HttpContextBase>(); httpRequest = new Mock <HttpRequestBase>(); httpResponse = new Mock <HttpResponseBase>(); genericPrincipal = new Mock <GenericPrincipal>(); httpSession = new Mock <HttpSessionStateBase>(); authentication = new Mock <IFormsAuthentication>(); identity = new Mock <IIdentity>(); principal = new Mock <IPrincipal>(); tempData = new Mock <TempDataDictionary>(); file = new Mock <HttpPostedFileBase>(); stream = new Mock <Stream>(); accountController = new Mock <AccountController>(); }
public NotificationController(IGoalService goalService, IUpdateService updateService, ICommentService commentService, IGroupInvitationService groupInvitationService, ISupportInvitationService supportInvitationService, IFollowRequestService followRequestService, IUserService userService) { this.goalService = goalService; this.supportInvitationService = supportInvitationService; this.updateService = updateService; this.groupInvitationService = groupInvitationService; this.commentService = commentService; this.followRequestService = followRequestService; this.userService = userService; }
public void CreateFollowUserFromRequest(FollowUser followUser, IFollowRequestService groupRequestService) { var oldUser = followUserRepository.GetMany(g => g.FromUserId == followUser.FromUserId && g.ToUserId == followUser.ToUserId); if (oldUser.Count() == 0) { followUserRepository.Add(followUser); SaveFollowUser(); } groupRequestService.ApproveRequest(followUser.ToUserId, followUser.FromUserId); }
public AccountController(IUserService userService, IUserProfileService userProfileService, IGoalService goalService, IUpdateService updateService, ICommentService commentService, IFollowRequestService followRequestService, IFollowUserService followUserService, ISecurityTokenService securityTokenService, UserManager <ApplicationUser> userManager) { this.userService = userService; this.userProfileService = userProfileService; this.goalService = goalService; this.updateService = updateService; this.commentService = commentService; this.followRequestService = followRequestService; this.followUserService = followUserService; this.securityTokenService = securityTokenService; this.UserManager = userManager; }
public AccountController(IUserService userService, IUserProfileService userProfileService, IGoalService goalService, IUpdateService updateService, ICommentService commentService, IFollowRequestService followRequestService, IFollowUserService followUserService, ISecurityTokenService securityTokenService, UserManager<ApplicationUser> userManager) { this.userService = userService; this.userProfileService = userProfileService; this.goalService = goalService; this.updateService = updateService; this.commentService = commentService; this.followRequestService = followRequestService; this.followUserService = followUserService; this.securityTokenService = securityTokenService; this.UserManager = userManager; }
public void SetUp() { groupInvitationRepository = new Mock <IGroupInvitationRepository>(); supportInvitationRepository = new Mock <ISupportInvitationRepository>(); followRequestRepository = new Mock <IFollowRequestRepository>(); userRepository = new Mock <IUserRepository>(); userProfileRepository = new Mock <IUserProfileRepository>(); unitOfWork = new Mock <IUnitOfWork>(); controllerContext = new Mock <ControllerContext>(); contextBase = new Mock <HttpContextBase>(); principal = new Mock <IPrincipal>(); identity = new Mock <IIdentity>(); httpRequest = new Mock <HttpRequestBase>(); httpResponse = new Mock <HttpResponseBase>(); genericPrincipal = new Mock <GenericPrincipal>(); groupInvitationService = new GroupInvitationService(groupInvitationRepository.Object, unitOfWork.Object); supportInvitationService = new SupportInvitationService(supportInvitationRepository.Object, unitOfWork.Object); followRequestService = new FollowRequestService(followRequestRepository.Object, unitOfWork.Object); userService = new UserService(userRepository.Object, unitOfWork.Object, userProfileRepository.Object); }
public void SetUp() { groupInvitationRepository = new Mock<IGroupInvitationRepository>(); supportInvitationRepository = new Mock<ISupportInvitationRepository>(); followRequestRepository = new Mock<IFollowRequestRepository>(); userRepository = new Mock<IUserRepository>(); userProfileRepository = new Mock<IUserProfileRepository>(); unitOfWork = new Mock<IUnitOfWork>(); controllerContext = new Mock<ControllerContext>(); contextBase = new Mock<HttpContextBase>(); principal = new Mock<IPrincipal>(); identity = new Mock<IIdentity>(); httpRequest = new Mock<HttpRequestBase>(); httpResponse = new Mock<HttpResponseBase>(); genericPrincipal = new Mock<GenericPrincipal>(); groupInvitationService = new GroupInvitationService(groupInvitationRepository.Object, unitOfWork.Object); supportInvitationService = new SupportInvitationService(supportInvitationRepository.Object, unitOfWork.Object); followRequestService = new FollowRequestService(followRequestRepository.Object, unitOfWork.Object); userService = new UserService(userRepository.Object, unitOfWork.Object, userProfileRepository.Object); }
/// <summary> /// Create new instance. /// </summary> public FollowRequestController(IFollowRequestService followRequestService, IMapper mapper) { _followRequestService = followRequestService ?? throw new ArgumentNullException(nameof(followRequestService)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }