public new void Setup()
        {
            base.Setup();

            User                = GetInst <UserLogic>();
            Password            = GetInst <IPasswordLogic>();
            UserServices        = GetInst <UserServicesLogic>();
            SyncUser            = GetInst <SynchronizeUserLogic>();
            UserProfile         = GetInst <IUserProfileLogic>();
            Consent             = GetInst <IConsentLogic>();
            Otac                = GetInst <OtacLogic>();
            HandoverCreditCheck = GetInst <IHandoverCreditCheckLogic>();
            LegacyBroadband     = GetInst <ILegacyBroadbandService>();
            AccessPersonalData  = GetInst <IAccessPersonalDataLogic>();

            dict = new Dictionary <Params, object>()
            {
                { Params.User, User },
                { Params.Password, Password },
                { Params.UserServices, UserServices },
                { Params.SyncUser, SyncUser },
                { Params.UserProfile, UserProfile },
                { Params.Consent, Consent },
                { Params.Otac, Otac },
                { Params.HandoverCreditCheck, HandoverCreditCheck },
                { Params.LegacyBroadband, LegacyBroadband },
                { Params.AccessPersonalData, AccessPersonalData },
            };
        }
Exemplo n.º 2
0
 protected T CreateTestControllerWith <T>(
     UserValidationLogic userValidationLogic = null,
     UserServicesLogic userServicesLogic     = null,
     UserVASLogic userVasLogic = null,
     TeliaTvLogic teliaTvLogic = null,
     UserValueAddedServiceStatusLogic userVasStatusLogic = null,
     SubscriptionVasLogic subscriptionVasLogic           = null,
     IUserManager userManager = null,
     IHateoasHandlerFactory hateoasHandlerFactory = null
     ) where T : ApiController, new()
 {
     _userValidationLogic   = userValidationLogic ?? _userValidationLogic;
     _userServicesLogic     = userServicesLogic ?? _userServicesLogic;
     _userVasLogic          = userVasLogic ?? _userVasLogic;
     _teliaTvLogic          = teliaTvLogic ?? _teliaTvLogic;
     _userVasStatusLogic    = userVasStatusLogic ?? _userVasStatusLogic;
     _subscriptionVasLogic  = subscriptionVasLogic ?? _subscriptionVasLogic;
     _userManager           = userManager ?? _userManager;
     _hateoasHandlerFactory = hateoasHandlerFactory ?? _hateoasHandlerFactory;
     return(new ValueAddedServicesController(
                _userValidationLogic,
                _userServicesLogic,
                _userVasLogic,
                _teliaTvLogic,
                _userVasStatusLogic,
                _subscriptionVasLogic,
                _userManager,
                _hateoasHandlerFactory
                ) as T);
 }
Exemplo n.º 3
0
        public void SetUp()
        {
            _userValidationLogic   = GetInst <UserValidationLogic> ();
            _userServicesLogic     = GetInst <UserServicesLogic> ();
            _userVasLogic          = GetInst <UserVASLogic> ();
            _teliaTvLogic          = GetInst <TeliaTvLogic> ();
            _userVasStatusLogic    = GetInst <UserValueAddedServiceStatusLogic> ();
            _subscriptionVasLogic  = GetInst <SubscriptionVasLogic> ();
            _hateoasHandlerFactory = GetInst <IHateoasHandlerFactory> ();
            _userManager           = GetInst <IUserManager> ();

            base.Setup();
        }
Exemplo n.º 4
0
        public T CreateTestControllerWith <T>(
            UserLogic user = null,
            UserServicesLogic userServices = null,
            SynchronizeUserLogic syncUser  = null,
            IUserProfileLogic userProfile  = null,
            IConsentLogic consent          = null,
            IPasswordLogic password        = null,
            OtacLogic otac = null,
            IHandoverCreditCheckLogic handoverCreditCheck = null,
            ILegacyBroadbandService legacyBroadband       = null,
            IAccessPersonalDataLogic accessPersonalData   = null
            ) where T : ApiController, new()
        {
            user                = Eval <UserLogic> (Params.User, user);
            userServices        = Eval <UserServicesLogic> (Params.UserServices, userServices);
            syncUser            = Eval <SynchronizeUserLogic>(Params.SyncUser, syncUser);
            userProfile         = Eval <IUserProfileLogic>(Params.UserProfile, userProfile);
            consent             = Eval <IConsentLogic>(Params.Consent, consent);
            password            = Eval <IPasswordLogic>(Params.Password, password);
            otac                = Eval <OtacLogic>(Params.Otac, otac);
            handoverCreditCheck = Eval <IHandoverCreditCheckLogic>(Params.HandoverCreditCheck, handoverCreditCheck);
            legacyBroadband     = Eval <ILegacyBroadbandService>(Params.LegacyBroadband, legacyBroadband);
            accessPersonalData  = Eval <IAccessPersonalDataLogic>(Params.AccessPersonalData, accessPersonalData);

            var ctrl = new UserController(
                user,
                userServices,
                syncUser,
                userProfile,
                consent,
                password,
                otac,
                handoverCreditCheck,
                legacyBroadband,
                accessPersonalData
                );

            return(ctrl as T);
        }