コード例 #1
0
        public void Arrange()
        {
            _orchestrator = new Mock <EmployerAccountTransactionsOrchestrator>();
            _owinWrapper  = new Mock <IAuthenticationService>();

            _orchestrator.Setup(x => x.GetAccountTransactions(It.IsAny <string>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <string>()))
            .ReturnsAsync(new OrchestratorResponse <TransactionViewResultViewModel>
            {
                Data = new TransactionViewResultViewModel(DateTime.Now)
                {
                    Account = new EAS.Account.Api.Types.AccountDetailViewModel(),
                    Model   = new TransactionViewModel
                    {
                        Data = new AggregationData()
                    },
                    AccountHasPreviousTransactions = true
                }
            });

            _controller = new Web.Controllers.EmployerAccountTransactionsController(
                _owinWrapper.Object, _orchestrator.Object, Mock.Of <IMapper>(), Mock.Of <IMediator>(), Mock.Of <ILog>());
        }
コード例 #2
0
        public void Arrange()
        {
            _orchestrator           = new Mock <EmployerAccountTransactionsOrchestrator>();
            _owinWrapper            = new Mock <IOwinWrapper>();
            _featureToggle          = new Mock <IFeatureToggle>();
            _userViewTestingService = new Mock <IMultiVariantTestingService>();
            _flashMessage           = new Mock <ICookieStorageService <FlashMessageViewModel> >();

            _orchestrator.Setup(x => x.GetAccountTransactions(It.IsAny <string>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <string>()))
            .ReturnsAsync(new OrchestratorResponse <TransactionViewResultViewModel>
            {
                Data = new TransactionViewResultViewModel(DateTime.Now)
                {
                    Account = new Account(),
                    Model   = new TransactionViewModel
                    {
                        Data = new AggregationData()
                    },
                    AccountHasPreviousTransactions = true
                }
            });

            _controller = new Web.Controllers.EmployerAccountTransactionsController(_owinWrapper.Object, _featureToggle.Object, _orchestrator.Object, _userViewTestingService.Object, _flashMessage.Object);
        }