public async Task GetAllStreetChampions() { VolunteerCache volunteerCache = new VolunteerCache(_memDistCache.Object, _volunteersForCacheGetter.Object); VolunteerType volunteerType = VolunteerType.StreetChampion; IEnumerable <CachedVolunteerDto> result = await volunteerCache.GetCachedVolunteersAsync(volunteerType, CancellationToken.None); Assert.AreEqual(2, result.Count()); Assert.IsTrue(result.Any(x => x.UserId == 3)); Assert.IsTrue(result.Any(x => x.UserId == 4)); }
public async Task GetAllHelpers() { VolunteerCache volunteerCache = new VolunteerCache(_memDistCache.Object, _volunteersForCacheGetter.Object); VolunteerType volunteerType = VolunteerType.Helper; IsVerifiedType isVerifiedType = IsVerifiedType.IsVerified | IsVerifiedType.IsNotVerified; IEnumerable <CachedVolunteerDto> result = await volunteerCache.GetCachedVolunteersAsync(volunteerType, CancellationToken.None); Assert.AreEqual(2, result.Count()); Assert.IsTrue(result.Any(x => x.UserId == 1)); Assert.IsTrue(result.Any(x => x.UserId == 2)); }