Esempio n. 1
0
        public static IList <Member> FindFriendsFromEmails(Guid networkerId, string[] emailsToGet)
        {
            var ids = from e in emailsToGet
                      let id = _memberContactsQuery.GetFirstDegreeContact(networkerId, e)
                               where id != null
                               select id.Value;

            return(_membersQuery.GetMembers(ids));
        }
Esempio n. 2
0
        private void PerformSearch(Guid memberId, string emailAddress, params Member[] expectedMembers)
        {
            var contact = _memberContactsQuery.GetFirstDegreeContact(memberId, emailAddress);

            switch (expectedMembers.Length)
            {
            case 0:
                Assert.IsNull(contact);
                break;

            case 1:
                Assert.IsNotNull(contact);
                Assert.AreEqual(expectedMembers[0].Id, contact);
                break;

            default:
                Assert.Fail("Should not be more than 1 expected member.");
                break;
            }
        }