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); }
private static bool CanModifyJobAds(IMember member, JobAdBlockList blockList) { if (!CanAccessBlockList(member, blockList, false)) { return(false); } // Must own the blockList. return(blockList.MemberId == member.Id); }