public CoreUserHelper(IGenericUnitofWork uow, IMembershipService membershipService)
        {
            MembershipService = membershipService;
            UnitofWork = uow;

            #region PrivateProfileHelper
            SpecialistPrivateProfileHelper = new SpecialistPrivateProfileHelper(uow, membershipService, this);
            OwnerPrivateProfileHelper = new OwnerPrivateProfileHelper(uow, membershipService, this);
            AgentPrivateProfileHelper = new AgentPrivateProfileHelper(uow, membershipService, this);
            TenantPrivateProfileHelper = new TenantPrivateProfileHelper(uow, membershipService, this);
            ProviderPrivateProfileHelper = new ProviderPrivateProfileHelper(uow, membershipService, this);
            #region Associated
            ProviderTeamPrivateProfileHelper = new ProviderTeamPrivateProfileHelper(uow, membershipService, this);
            #endregion
            #endregion

            #region PublicProfileHelper
            SpecialistPublicProfileHelper = new SpecialistPublicProfileHelper(uow, membershipService, this);
            OwnerPublicProfileHelper = new OwnerPublicProfileHelper(uow, membershipService);
            AgentPublicProfileHelper = new AgentPublicProfileHelper(uow, membershipService);
            TenantPublicProfileHelper = new TenantPublicProfileHelper(uow, membershipService);
            ProviderPublicProfileHelper = new ProviderPublicProfileHelper(uow, membershipService, this);
            #endregion

            #region Common
            LocationHelper = new LocationHelper(uow, membershipService);
            PosterHelper = new PosterHelper(uow, membershipService);
            UserIdentity = new UserIdentity(uow, membershipService);
            #endregion

            #region Job
            TenantRentalApplicationHelper = new TenantRentalApplicationHelper(uow, membershipService);
            JobOffer = new JobOffer(uow, membershipService);
            #endregion

            #region Unit
            UnitHelper = new UnitHelper(uow, membershipService, this);
            #endregion
        }
        public void Initialize()
        {
            // Arrange
            #region SpecialistPublicProfileHelper

            #region Repo
            var professionalRepo = new FakeSpecialistRepository();
            var maintenanceCompanyLookUpRepo = new FakeMaintenanceCompanyLookUpRepository();
            var maintenanceRepairRepo = new FakeMaintenanceRepairRepository();
            var maintenanceCompanySpecializationRepo = new FakeMaintenanceCompanySpecializationRepository();
            var currencyRepo = new FakeCurrencyRepository();
            var specialistProfileCommentRepo = new FakeSpecialistProfileCommentRepository();
            var specialistWorkRepo = new FakeSpecialistWorkRepository();
            var tenantRepo = new FakeTenantRepository();
            Uow = new UnitofWork
               {
               SpecialistRepository = professionalRepo,
               MaintenanceCompanyLookUpRepository = maintenanceCompanyLookUpRepo,
               MaintenanceRepairRepository = maintenanceRepairRepo,
               MaintenanceCompanySpecializationRepository = maintenanceCompanySpecializationRepo,
               CurrencyRepository = currencyRepo,
               SpecialistProfileCommentRepository = specialistProfileCommentRepo,
               SpecialistWorkRepository = specialistWorkRepo,
               TenantRepository = tenantRepo
               };
            #endregion

            #region Mocking Context

            //MockHelper
            var specialistPublicProfileHelperController =
                new SpecialistPublicProfileHelper(Uow, new FakeMembershipProvider(), null);

            //Context
            var controllerContext = new Mock<ControllerContext>();
            controllerContext.SetupGet(x => x.HttpContext.Request.Url).Returns(new Uri("http://tempuri.org"));
            specialistPublicProfileHelperController.ControllerContext = controllerContext.Object;
            #endregion

            #region Mocking IUserHelper
            var mockHelper = new Mock<IUserHelper>();
            mockHelper.
                Setup(x => x.SpecialistPublicProfileHelper).
                Returns(specialistPublicProfileHelperController);
            mockHelper.
                Setup(x => x.PosterHelper).
                Returns(new PosterHelper(Uow, new FakeMembershipProvider()));
            #endregion

            #region Mocking MemberShipService
            //MembershipService Optional
            var membershipMock = new Mock<IMembershipService>();
            //var userMock = new Mock<MembershipUser>();
            //var secondSpecialist = professionalRepo.MyList[1];
            //userMock.Setup(u => u.ProviderUserKey).Returns(secondSpecialist.GUID);
            //userMock.Setup(u => u.UserName).Returns(secondSpecialist.FirstName);
            //membershipMock.Setup(s => s.GetUser(It.IsAny<string>())).Returns(userMock.Object);
            #endregion

            #region Controller Construction

            // Controller = new SpecialistProfileController(Uow, membershipMock.Object, new CoreUserHelper(Uow, membershipMock.Object));
            Controller = new SpecialistProfileController(Uow, membershipMock.Object, mockHelper.Object);

            #endregion

            #endregion
        }