public async Task <ApiGroups> GetGroups() { var timeUpdated = _settings.CacheUpdateInterval; Func <Task <ApiGroups> > dataSource = () => _mireaApiClient.GetAllGroups(); var groups = await LocalCacheProvider.GetAsync(LocalCacheHelper.GroupsCacheKey, dataSource, timeUpdated); return(groups); }
public async Task GetAllGroups() { var actualGroups = await _mireaApiClient.GetAllGroups(); Assert.NotEmpty(actualGroups.Bachelor.First); Assert.NotEmpty(actualGroups.Bachelor.Second); Assert.NotEmpty(actualGroups.Bachelor.Third); Assert.NotEmpty(actualGroups.Bachelor.Fourth); Assert.NotEmpty(actualGroups.Master.First); Assert.NotEmpty(actualGroups.Master.Second); }