Exemple #1
0
        public T CreateTestControllerWith <T>(
            MsisdnLogic msisdn            = null,
            ISimLogic sim                 = null,
            IAccessRightLogic accessRight = null,
            IUserProfileLogic userProfile = null
            ) where T : ApiController, new()
        {
            msisdn      = Eval <MsisdnLogic>(Params.Msisdn, msisdn);
            sim         = Eval <ISimLogic>(Params.Sim, sim);
            accessRight = Eval <IAccessRightLogic>(Params.AccessRight, accessRight);
            userProfile = Eval <IUserProfileLogic>(Params.UserProfile, userProfile);

            return(new MsisdnController(msisdn, sim, accessRight, userProfile) as T);
        }
        public new void Setup()
        {
            base.Setup();

            _topUpLogic = GetInst <ITopUpLogic>();

            _userManager         = GetInst <IUserManager>();
            _usageLogic          = GetInst <IUsageLogic>();
            _userValidationLogic = GetInst <UserValidationLogic>();

            _accessRightLogic = GetInst <IAccessRightLogic>();

            _subscriptionService       = GetInst <ISubscriptionService>();
            _subscriptionLogic         = GetInst <ISubscriptionLogic>();
            _subscriptionVasLogic      = GetInst <SubscriptionVasLogic>();
            _subscriptionStatusLogic   = GetInst <ISubscriptionStatusLogic>();
            _changeSubscriptionLogic   = GetInst <IChangeSubscriptionLogic>();
            _subscriptionOfferingLogic = GetInst <ISubscriptionOfferingLogic>();

            _appSettings    = GetInst <IApplicationSettings>();
            _catalogService = GetInst <ICatalogService>();

            _cbmService    = GetInst <ICbmService>();
            _orderSimLogic = GetInst <IOrderSimLogic>();
            _accountLogic  = GetInst <IAccountLogic>();

            dict = new Dictionary <Params, object>()
            {
                { Params.TopUp, _topUpLogic },
                { Params.UserManager, _userManager },
                { Params.Usage, _usageLogic },
                { Params.UserValidation, _userValidationLogic },
                { Params.AccessRights, _accessRightLogic },
                { Params.SubscriptionService, _subscriptionService },
                { Params.Subscription, _subscriptionLogic },
                { Params.SubscriptionVas, _subscriptionVasLogic },
                { Params.SubscriptionStatus, _subscriptionStatusLogic },
                { Params.ChangeSubscription, _changeSubscriptionLogic },
                { Params.SubscriptionOffering, _subscriptionOfferingLogic },
                { Params.AppSettings, _appSettings },
                { Params.CatalogService, _catalogService },
                { Params.CbmService, _cbmService },
                { Params.OrderSim, _orderSimLogic },
                { Params.Account, _accountLogic }
            };
        }
Exemple #3
0
        public void SetUp()
        {
            _msisdn      = GetInst <MsisdnLogic>();
            _sim         = GetInst <ISimLogic>();
            _accessRight = GetInst <IAccessRightLogic>();
            _userProfile = GetInst <IUserProfileLogic>();

            dict = new Dictionary <Params, object>()
            {
                { Params.Msisdn, _msisdn },
                { Params.Sim, _sim },
                { Params.AccessRight, _accessRight },
                { Params.UserProfile, _userProfile },
            };

            base.Setup();
        }