public IActionResult Index() { string cookie = string.Empty; if (Request != null) { cookie = Request.Cookies["settings"]; } _dataloader.AddSettings(cookie); return(View(new ComponentSettings(cookie))); }
public async Task GetDatFromApiReturnsListOfUsersIfComponentSettingsisEmpty() { _dataLoader.AddSettings(""); var result = await _dataLoader.GetDataFromApiAsync(); Assert.NotNull(result); Assert.IsType <List <User> >(result); Assert.Equal(_expectedCount, result.Count); Assert.Null(result.First().Phone); Assert.Null(result.First().City); Assert.Null(result.First().Street); Assert.Null(result.First().Email); Assert.Null(result.First().Gender); }