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 }
            };
        }
Beispiel #2
0
 /// <summary>
 /// Allows fine grained control over how the controller is instantiated for a particular test
 /// Each of the optional arguments lets you override the default mock that will be used if arg not passed
 /// </summary>
 /// <param name="subscriptionVas"></param>
 /// <param name="userValidation"></param>
 /// <param name="subscriptionService"></param>
 /// <param name="subscription"></param>
 /// <param name="orderSim"></param>
 /// <param name="subscriptionStatus"></param>
 /// <param name="subscriptionOffering"></param>
 /// <param name="changeSubscription"></param>
 /// <param name="userManager"></param>
 /// <param name="catalogService"></param>
 /// <param name="account"></param>
 /// <returns></returns>
 public SubscriptionController CreateTestController(
     SubscriptionVasLogic subscriptionVas     = null,
     UserValidationLogic userValidation       = null,
     ISubscriptionService subscriptionService = null,
     ISubscriptionLogic subscription          = null,
     IOrderSimLogic orderSim = null,
     ISubscriptionStatusLogic subscriptionStatus     = null,
     ISubscriptionOfferingLogic subscriptionOffering = null,
     IChangeSubscriptionLogic changeSubscription     = null,
     IUserManager userManager       = null,
     ICatalogService catalogService = null,
     IAccountLogic account          = null
     )
 {
     subscriptionVas      = Eval <SubscriptionVasLogic>(Params.SubscriptionVas, subscriptionVas);
     userValidation       = Eval <UserValidationLogic>(Params.UserValidation, userValidation);
     subscriptionService  = Eval <ISubscriptionService>(Params.SubscriptionService, subscriptionService);
     subscription         = Eval <ISubscriptionLogic>(Params.Subscription, subscription);
     orderSim             = Eval <IOrderSimLogic>(Params.OrderSim, orderSim);
     subscriptionStatus   = Eval <ISubscriptionStatusLogic>(Params.SubscriptionStatus, subscriptionStatus);
     subscriptionOffering = Eval <ISubscriptionOfferingLogic>(Params.SubscriptionOffering, subscriptionOffering);
     changeSubscription   = Eval <IChangeSubscriptionLogic>(Params.ChangeSubscription, changeSubscription);
     userManager          = Eval <IUserManager>(Params.UserManager, userManager);
     catalogService       = Eval <ICatalogService>(Params.CatalogService, catalogService);
     account = Eval <IAccountLogic>(Params.Account, account);
     return(new SubscriptionController(
                subscriptionVas,
                userValidation,
                subscriptionService,
                subscription,
                orderSim,
                subscriptionStatus,
                subscriptionOffering,
                changeSubscription,
                userManager,
                catalogService,
                account
                ));
 }