public IList <string> GetAll(string phone)
        {
            var friendsPhones = _friendsRepository.GetAll(phone);

            if (friendsPhones.Count == 0)
            {
                throw new NullReferenceException("You'd better start making friends around here!!");
            }
            var friendsNames = _userRepository.MapPhonesToNames(friendsPhones);

            return(friendsNames);
        }
 public async Task <IEnumerable <Friend> > GetAll()
 {
     return(await _friendsRepository.GetAll());
 }
Beispiel #3
0
        public async void ShouldReturnAllFriends()
        {
            var list = await MockFriendsRepository.GetAll();

            Assert.True(list.Count() > 0);
        }