Пример #1
0
        public void CanGetMemberFromEmail()
        {
            IMemberRepository repository = new MemberRepository();
            Member member = repository.GetByEmail("[email protected]");

            Assert.AreEqual(member.FullName, _members[1].FullName);
            Assert.AreEqual(member.Email, _members[1].Email);
        }
Пример #2
0
        public Member FindMember(string memberIdentification)
        {
            IMemberRepository mr = new MemberRepository();

            var member = mr.GetByEmail(memberIdentification);
            if (member != null)
                return member;

            member = mr.GetByUsername(memberIdentification);
            if (member != null)
                return member;

            return null;
        }