public void CanGetPickListByDraftAndMember()
        {
            IFuturePickRepository repository = new FuturePickRepository();

            repository.FuturePickCard(_drafts[0], _members[0], _cards[0]);
            repository.FuturePickCard(_drafts[0], _members[0], _cards[1]);
            repository.FuturePickCard(_drafts[0], _members[0], _cards[2]);

            ICollection<FuturePick> picks = repository.GetFuturePicksByDraftAndMember(_drafts[0], _members[0]);

            Assert.AreEqual(3, picks.Count);
        }
Beispiel #2
0
        public List<FuturePick> GetMyFuturePicks(int draftId, int memberId)
        {
            IFuturePickRepository fpr = new FuturePickRepository();
            IDraftRepository dr = new DraftRepository();
            IMemberRepository mr = new MemberRepository();

            var draft = dr.GetById(draftId);
            var member = mr.GetById(memberId);
            var ret = fpr.GetFuturePicksByDraftAndMember(draft, member);
            return ret == null ? new List<FuturePick>() : ret.ToList();
        }