예제 #1
0
        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);
        }
예제 #2
0
        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);
        }