Пример #1
0
        public async Task CanPrepareCurrencySelectorModel()
        {
            var model = await _commonModelFactory.PrepareCurrencySelectorModelAsync();

            model.CurrentCurrencyId.Should().Be(1);
            model.AvailableCurrencies.Should().NotBeNullOrEmpty();
            model.AvailableCurrencies.Count.Should().Be(1);
        }
Пример #2
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var model = await _commonModelFactory.PrepareCurrencySelectorModelAsync();

            if (model.AvailableCurrencies.Count == 1)
            {
                return(Content(""));
            }

            return(View(model));
        }