private void AssertViewings(IEmployer employer, ICollection <IMember> expectedViewedMembers, IEnumerable <IMember> expectedNotViewedMembers) { foreach (var viewedMember in expectedViewedMembers) { Assert.IsTrue(_employerMemberViewsQuery.HasViewedMember(employer, viewedMember.Id)); } foreach (var notViewedMember in expectedNotViewedMembers) { Assert.IsFalse(_employerMemberViewsQuery.HasViewedMember(employer, notViewedMember.Id)); } var viewedMembers = _employerMemberViewsQuery.GetViewedMemberIds(employer); Assert.AreEqual(expectedViewedMembers.Count, viewedMembers.Count); foreach (var expectedViewedMember in expectedViewedMembers) { Assert.IsTrue(viewedMembers.Contains(expectedViewedMember.Id)); } foreach (var expectedNotViewedMember in expectedNotViewedMembers) { Assert.IsFalse(viewedMembers.Contains(expectedNotViewedMember.Id)); } }