Ejemplo n.º 1
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);
 }
Ejemplo n.º 2
0
        public void SetUp()
        {
            _usageLogic            = GetInst <IUsageLogic>();
            _accessRightLogic      = GetInst <AccessRightLogic>();
            _hateoasHandlerFactory = GetInst <IHateoasHandlerFactory>();
            _userManager           = GetInst <IUserManager>();

            base.Setup();
        }
        public T CreateTestControllerWith <T>(
            IOnboardingLogic onboarding          = null,
            IHateoasHandlerFactory hateosFactory = null,
            IUserManager userManager             = null) where T : ApiController, new()
        {
            onboarding    = Eval <IOnboardingLogic>(Params.Onboarding, onboarding);
            hateosFactory = Eval <IHateoasHandlerFactory>(Params.HateoasHandlerFactory, hateosFactory);
            userManager   = Eval <IUserManager>(Params.UserManager, userManager);

            return(new OrderController(onboarding, hateosFactory, userManager) as T);
        }
Ejemplo n.º 4
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();
        }
Ejemplo n.º 5
0
        protected T CreateTestControllerWith <T>(
            IUserManager userManager = null,
            IUsageLogic usageLogic   = null,
            IHateoasHandlerFactory hateoasHandlerFactory = null,
            AccessRightLogic accessRightLogic            = null
            ) where T : ApiController, new()
        {
            userManager           = useOrDefault <IUserManager>(userManager, _userManager);
            usageLogic            = useOrDefault <IUsageLogic>(usageLogic, _usageLogic);
            hateoasHandlerFactory = useOrDefault <IHateoasHandlerFactory>(hateoasHandlerFactory, _hateoasHandlerFactory);
            accessRightLogic      = useOrDefault <AccessRightLogic>(accessRightLogic, _accessRightLogic);

            return(new UsageController(userManager, usageLogic, hateoasHandlerFactory, accessRightLogic) as T);
        }
        public void SetUp()
        {
            _cdsService     = GetInst <ICdsService> ();
            _userManager    = GetInst <IUserManager> ();
            _cache          = GetInst <ICache> ();
            _cdsClient      = GetInst <ICDSClient> ();
            _appSettings    = GetInst <IApplicationSettings> ();
            _barringManager = GetInst <IBarringManager> ();
            _handoverLogic  = GetInst <IHandoverLogic> ();
            _ninjaClient    = GetInst <INinjaGenericInterfaceClient> ();
            _mapper         = GetInst <IMapper> ();

            _hateoasHandlerFactory = GetInst <IHateoasHandlerFactory> ();

            base.Setup();
        }
        public void SetUp()
        {
            // IOnboardingLogic onboarding
            _onboarding = GetInst <IOnboardingLogic>();
            // IHateoasHandlerFactory _hateosFactory;
            _hateosFactory = GetInst <IHateoasHandlerFactory>();
            // IUserManager _userManager ;
            _userManager = GetInst <IUserManager>();

            dict = new Dictionary <Params, object>()
            {
                { Params.Onboarding, _onboarding },
                { Params.HateoasHandlerFactory, _hateosFactory },
                { Params.UserManager, _userManager },
            };

            base.Setup();
        }