IList <Guid> IJobAdActivityFiltersQuery.GetExcludeJobAdIds(IMember member, JobAdSearchQuery query)
        {
            // Exclude filters.

            var jobAdIds = GetExcludeJobAdIds(member, query, null);

            // Exclude all blocked job ads.

            jobAdIds = GetExcludeList(jobAdIds, _jobAdBlockListsQuery.GetBlockedJobAdIds(member));
            return(jobAdIds == null ? null : jobAdIds.ToList());
        }
Beispiel #2
0
        protected void AssertBlockListJobAds(IMember member, ICollection <IJobAd> blockedJobAds, ICollection <IJobAd> notBlockedJobAds)
        {
            // IsBlocked

            foreach (var jobAd in blockedJobAds)
            {
                Assert.IsTrue(_jobAdBlockListsQuery.IsBlocked(member, jobAd.Id));
            }
            foreach (var jobAd in notBlockedJobAds)
            {
                Assert.IsFalse(_jobAdBlockListsQuery.IsBlocked(member, jobAd.Id));
            }

            // GetBlockedJobAdIds

            Assert.IsTrue((from m in blockedJobAds select m.Id).CollectionEqual(_jobAdBlockListsQuery.GetBlockedJobAdIds(member)));

            // GetBlockedCount

            Assert.AreEqual(blockedJobAds.Count, _jobAdBlockListsQuery.GetBlockedCount(member));
        }
 IList <Guid> IJobAdSortFiltersQuery.GetBlockedIncludeJobAdIds(IMember member)
 {
     return(_jobAdBlockListsQuery.GetBlockedJobAdIds(member));
 }