public void ReferralPersonalisationGroupCriteria_ContainsVisitor_WithDefinitionForReferrerDoesNotMatch_WithNonMatchingValue_ReturnsTrue()
        {
            // Arrange
            var mockReferralProvider = MockReferralProvider();
            var criteria = new ReferralPersonalisationGroupCriteria(mockReferralProvider.Object);
            var definition = string.Format(DefinitionFormat, "another-example", "DoesNotContainValue");

            // Act
            var result = criteria.MatchesVisitor(definition);

            // Assert
            Assert.IsTrue(result);
        }
        public void ReferralPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionForReferrerDoesNotMatch_WithMatchingValue_ReturnsFalse()
        {
            // Arrange
            var mockReferralProvider = MockReferralProvider();
            var criteria = new ReferralPersonalisationGroupCriteria(mockReferralProvider.Object);
            var definition = string.Format(DefinitionFormat, "http://www.example.com/", "DoesNotMatchValue");

            // Act
            var result = criteria.MatchesVisitor(definition);

            // Assert
            Assert.IsFalse(result);
        }
        public void ReferralPersonalisationGroupCriteria_MatchesVisitor_WithInvalidDefinition_ThrowsException()
        {
            // Arrange
            var mockReferralProvider = MockReferralProvider();
            var criteria = new ReferralPersonalisationGroupCriteria(mockReferralProvider.Object);
            var definition = "invalid";

            // Act
            criteria.MatchesVisitor(definition);
        }
        public void ReferralPersonalisationGroupCriteria_MatchesVisitor_WithEmptyDefinition_ThrowsException()
        {
            // Arrange
            var mockReferralProvider = MockReferralProvider();
            var criteria = new ReferralPersonalisationGroupCriteria(mockReferralProvider.Object);

            // Act
            criteria.MatchesVisitor((string)null);
        }