public void MemberProfileFieldPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionMatchingProfileField_WithNonMatchingField_ReturnsTrue() { // Arrange var mockMemberProfileFieldProvider = MockMemberProfileFieldProvider(); var criteria = new MemberProfileFieldPersonalisationGroupCriteria(mockMemberProfileFieldProvider.Object); var definition = string.Format(DefinitionFormat, "abc", "DoesNotMatchValue", "zyx"); // Act var result = criteria.MatchesVisitor(definition); // Assert Assert.IsTrue(result); }
public void MemberProfileFieldPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionForGreaterThanNumericValue_WithNonMatchingMemberProfileField_ReturnsFalse() { // Arrange var mockMemberProfileFieldProvider = MockMemberProfileFieldProvider(); var criteria = new MemberProfileFieldPersonalisationGroupCriteria(mockMemberProfileFieldProvider.Object); var definition = string.Format(DefinitionFormat, "numericCompareTest", "GreaterThanValue", "7"); // Act var result = criteria.MatchesVisitor(definition); // Assert Assert.IsFalse(result); }
public void MemberProfileFieldPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionForLessThanStringValue_WithMatchingMemberProfileField_ReturnsTrue() { // Arrange var mockMemberProfileFieldProvider = MockMemberProfileFieldProvider(); var criteria = new MemberProfileFieldPersonalisationGroupCriteria(mockMemberProfileFieldProvider.Object); var definition = string.Format(DefinitionFormat, "stringCompareTest", "LessThanValue", "ccc"); // Act var result = criteria.MatchesVisitor(definition); // Assert Assert.IsTrue(result); }