コード例 #1
0
        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
        }
コード例 #2
0
        public TenantPrivateProfileHelper TenantPrivateProfileHelperMock()
        {
            var tenantUserIdentity = new UserIdentity(Uow, new FakeMembershipProvider());
            tenantUserIdentity.MockHttpContext();
            tenantUserIdentity.MockTenantFred();

            var tenantPrivatemockHelper = new Mock<IUserHelper>();
            tenantPrivatemockHelper.Setup(x => x.UserIdentity).Returns(tenantUserIdentity);

            var tenantPrivateProfileHelper = new TenantPrivateProfileHelper(Uow, new FakeMembershipProvider(), tenantPrivatemockHelper.Object);
            tenantPrivateProfileHelper.MockHttpContext();
            tenantPrivateProfileHelper.MockTenantFred();
            return tenantPrivateProfileHelper;
        }