public async Task CanPrepareCurrencySelectorModel() { var model = await _commonModelFactory.PrepareCurrencySelectorModelAsync(); model.CurrentCurrencyId.Should().Be(1); model.AvailableCurrencies.Should().NotBeNullOrEmpty(); model.AvailableCurrencies.Count.Should().Be(1); }
public async Task <IViewComponentResult> InvokeAsync() { var model = await _commonModelFactory.PrepareCurrencySelectorModelAsync(); if (model.AvailableCurrencies.Count == 1) { return(Content("")); } return(View(model)); }