public void MemberGroupPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionNotMatchingGroup_WithNonMatchingGroup_ReturnsTrue() { // Arrange var mockMemberGroupProvider = MockMemberGroupProvider("Group B"); var criteria = new MemberGroupPersonalisationGroupCriteria(mockMemberGroupProvider.Object); var definition = string.Format(DefinitionFormat, "Group A", "IsNotInGroup"); // Act var result = criteria.MatchesVisitor(definition); // Assert Assert.IsTrue(result); }
public void MemberGroupPersonalisationGroupCriteria_MatchesVisitor_WithInvalidDefinition_ThrowsException() { // Arrange var mockMemberGroupProvider = MockMemberGroupProvider(); var criteria = new MemberGroupPersonalisationGroupCriteria(mockMemberGroupProvider.Object); var definition = "invalid"; // Act criteria.MatchesVisitor(definition); }
public void MemberGroupPersonalisationGroupCriteria_MatchesVisitor_WithEmptyDefinition_ThrowsException() { // Arrange var mockMemberGroupProvider = MockMemberGroupProvider(); var criteria = new MemberGroupPersonalisationGroupCriteria(mockMemberGroupProvider.Object); // Act criteria.MatchesVisitor((string)null); }