Example #1
0
        public FunMgtControllerTest(CommonFixture commonFixture)
        {
            this.commonFixture = commonFixture;

            //Generate Token
            commonFixture.LoginAndGetToken();

            FunTypeMgtHelper funTypeMgtHelper = Bootstrapper.Container.GetExportedValue <FunTypeMgtHelper>();
            FunMgtHelper     funMgtHelper     = Bootstrapper.Container.GetExportedValue <FunMgtHelper>();

            fManageController = new FManageController(Bootstrapper.Container);

            fManageController.ServiceAuthorizedKey = commonFixture.StrToken;

            fManageController.funTypeMgtHelper = new Lazy <FunTypeMgtHelper>(() => funTypeMgtHelper);
            fManageController.funMgtHelper     = new Lazy <FunMgtHelper>(() => funMgtHelper);

            fManageController.TempData[StaticContent.LanguageKey] = this.commonFixture.LanguageKey;

            fManageController.FunKey = "FManage";

            WCFAuthInfoVM entity_WCFAuthInfoVM = new WCFAuthInfoVM("", "", commonFixture.StrToken, fManageController.FunKey, "Create", this.commonFixture.LanguageKey.ToString(), "");

            entityList_FunTypeVM = funTypeMgtHelper.GetAllFunType(entity_WCFAuthInfoVM);
        }
Example #2
0
        public OrgMgtControllerTest(CommonFixture commonFixture)
        {
            this.commonFixture = commonFixture;

            //Generate Token
            commonFixture.LoginAndGetToken();

            orgMgtController = new LUOrganizationManageController(Bootstrapper.Container);

            orgMgtController.ServiceAuthorizedKey = commonFixture.StrToken;

            FunMgtHelper       funMgtHelper       = Bootstrapper.Container.GetExportedValue <FunMgtHelper>();
            OrgDetailMgtHelper orgDetailMgtHelper = Bootstrapper.Container.GetExportedValue <OrgDetailMgtHelper>();
            OrgMgtHelper       orgMgtHelper       = Bootstrapper.Container.GetExportedValue <OrgMgtHelper>();
            RoleMgtHelper      roleMgtHelper      = Bootstrapper.Container.GetExportedValue <RoleMgtHelper>();

            orgMgtController.funMgtHelper       = new Lazy <FunMgtHelper>(() => funMgtHelper);
            orgMgtController.orgDetailMgtHelper = new Lazy <OrgDetailMgtHelper>(() => orgDetailMgtHelper);
            orgMgtController.orgMgtHelper       = new Lazy <OrgMgtHelper>(() => orgMgtHelper);
            orgMgtController.roleMgtHelper      = new Lazy <RoleMgtHelper>(() => roleMgtHelper);

            orgMgtController.TempData[StaticContent.LanguageKey] = this.commonFixture.LanguageKey;

            orgMgtController.FunKey = "LUOrganizationManage";
        }
Example #3
0
        public OrgDetailsMgtControllerTest(CommonFixture commonFixture)
        {
            this.commonFixture = commonFixture;

            //Generate Token
            commonFixture.LoginAndGetToken();

            orgDetailsMgtController = new LUOrgDetailsManageController(Bootstrapper.Container);

            orgDetailsMgtController.ServiceAuthorizedKey = commonFixture.StrToken;

            FunMgtHelper       funMgtHelper       = Bootstrapper.Container.GetExportedValue <FunMgtHelper>();
            OrgDetailMgtHelper orgDetailMgtHelper = Bootstrapper.Container.GetExportedValue <OrgDetailMgtHelper>();
            RoleMgtHelper      roleMgtHelper      = Bootstrapper.Container.GetExportedValue <RoleMgtHelper>();

            orgDetailsMgtController.funMgtHelper       = new Lazy <FunMgtHelper>(() => funMgtHelper);
            orgDetailsMgtController.orgDetailMgtHelper = new Lazy <OrgDetailMgtHelper>(() => orgDetailMgtHelper);
            orgDetailsMgtController.roleMgtHelper      = new Lazy <RoleMgtHelper>(() => roleMgtHelper);

            orgDetailsMgtController.TempData[StaticContent.LanguageKey] = this.commonFixture.LanguageKey;

            orgDetailsMgtController.FunKey     = "LUOrgDetailsManage";
            orgDetailsMgtController.FunTypeKey = "Create";

            #region [ Initialize List ]
            WCFAuthInfoVM entity_WCFAuthInfoVM = new WCFAuthInfoVM("", "", commonFixture.StrToken, orgDetailsMgtController.FunKey, orgDetailsMgtController.FunTypeKey, this.commonFixture.LanguageKey.ToString(), "");
            //All Fun
            entityList_FunVM = orgDetailsMgtController.funMgtHelper.Value.GetAll(entity_WCFAuthInfoVM);
            //All Role
            entityList_RoleVM = orgDetailsMgtController.roleMgtHelper.Value.GetAll(entity_WCFAuthInfoVM);
            #endregion
        }
Example #4
0
        public LoginUserMgtControllerTest(CommonFixture commonFixture)
        {
            this.commonFixture = commonFixture;

            //Generate Token
            commonFixture.LoginAndGetToken();

            LoginUserMgtHelper luMgtHelper        = Bootstrapper.Container.GetExportedValue <LoginUserMgtHelper>();
            FunMgtHelper       funMgtHelper       = Bootstrapper.Container.GetExportedValue <FunMgtHelper>();
            OrgDetailMgtHelper orgDetailMgtHelper = Bootstrapper.Container.GetExportedValue <OrgDetailMgtHelper>();
            OrgMgtHelper       orgMgtHelper       = Bootstrapper.Container.GetExportedValue <OrgMgtHelper>();
            RoleMgtHelper      roleMgtHelper      = Bootstrapper.Container.GetExportedValue <RoleMgtHelper>();

            loginUserMgtController = new LoginUserManageController(Bootstrapper.Container);

            loginUserMgtController.loginUserMgtHelper = new Lazy <LoginUserMgtHelper>(() => luMgtHelper);
            loginUserMgtController.orgDetailMgtHelper = new Lazy <OrgDetailMgtHelper>(() => orgDetailMgtHelper);
            loginUserMgtController.orgMgtHelper       = new Lazy <OrgMgtHelper>(() => orgMgtHelper);
            loginUserMgtController.roleMgtHelper      = new Lazy <RoleMgtHelper>(() => roleMgtHelper);
            loginUserMgtController.funMgtHelper       = new Lazy <FunMgtHelper>(() => funMgtHelper);

            loginUserMgtController.TempData[StaticContent.LanguageKey] = this.commonFixture.LanguageKey;

            #region [ Initialize List ]
            loginUserMgtController.FunKey               = "LoginUserManage";
            loginUserMgtController.FunTypeKey           = "Create";
            loginUserMgtController.ServiceAuthorizedKey = commonFixture.StrToken;

            WCFSessionVM entity_WCFSessionVM = new WCFSessionVM("", "", commonFixture.StrToken, loginUserMgtController.FunKey, loginUserMgtController.FunTypeKey, this.commonFixture.LanguageKey.ToString(), "");
            //All Fun
            entityList_FunctionVM = loginUserMgtController.funMgtHelper.Value.GetAll(entity_WCFSessionVM);
            //All Org
            entityList_LUserOrganizationVM = loginUserMgtController.orgMgtHelper.Value.GetAll(entity_WCFSessionVM);
            //All Org Details
            entityList_LUserOrgDetailsVM = loginUserMgtController.orgDetailMgtHelper.Value.GetAll(entity_WCFSessionVM);
            //All Role
            entityList_LUserRoleVM = loginUserMgtController.roleMgtHelper.Value.GetAll(entity_WCFSessionVM);

            #endregion

            loginUserMgtController.guidList_AccessedOrgID   = loginUserMgtController.GetOrgIDList(commonFixture.entity_ServerSideSession, "LoginUserManage", "Create", entityList_LUserOrganizationVM);
            loginUserMgtController.guidList_AccessedLUserID = loginUserMgtController.GetLUserIDList(commonFixture.entity_ServerSideSession, "LoginUserManage", "Create", luMgtHelper, entity_WCFSessionVM);
        }