예제 #1
0
 protected static void AssertBlockList(IMember member, JobAdBlockList expectedBlockList, JobAdBlockList blockList)
 {
     Assert.AreNotEqual(Guid.Empty, blockList.Id);
     Assert.AreNotEqual(DateTime.MinValue, blockList.CreatedTime);
     Assert.AreEqual(expectedBlockList.Name, blockList.Name);
     Assert.AreEqual(expectedBlockList.BlockListType, blockList.BlockListType);
     Assert.IsNull(blockList.Name);
     Assert.AreEqual(member.Id, blockList.MemberId);
     Assert.AreEqual(expectedBlockList.MemberId, blockList.MemberId);
 }
예제 #2
0
        private static bool CanModifyJobAds(IMember member, JobAdBlockList blockList)
        {
            if (!CanAccessBlockList(member, blockList, false))
            {
                return(false);
            }

            // Must own the blockList.

            return(blockList.MemberId == member.Id);
        }