public void NumberOfVisitsPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionForLessThanNumber_WithMoreThanTheNumberOfVisits_ReturnsFalse()
        {
            // Arrange
            var mockNumberOfVisitsProvider = MockNumberOfVisitsProvider(3);
            var criteria = new NumberOfVisitsPersonalisationGroupCriteria(mockNumberOfVisitsProvider.Object);
            var definition = string.Format(DefinitionFormat, "LessThan", 2);

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

            // Assert
            Assert.IsFalse(result);
        }
        public void NumberOfVisitsPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionForExactlyNumber_WithExactlyTheNumberOfVisits_ReturnsTrue()
        {
            // Arrange
            var mockNumberOfVisitsProvider = MockNumberOfVisitsProvider(2);
            var criteria = new NumberOfVisitsPersonalisationGroupCriteria(mockNumberOfVisitsProvider.Object);
            var definition = string.Format(DefinitionFormat, "Exactly", 2);

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

            // Assert
            Assert.IsTrue(result);
        }
        public void NumberOfVisitsPersonalisationGroupCriteria_MatchesVisitor_WithInvalidDefinition_ThrowsException()
        {
            // Arrange
            var mockNumberOfVisitsProvider = MockNumberOfVisitsProvider();
            var criteria = new NumberOfVisitsPersonalisationGroupCriteria(mockNumberOfVisitsProvider.Object);
            var definition = "invalid";

            // Act
            criteria.MatchesVisitor(definition);
        }
        public void NumberOfVisitsPersonalisationGroupCriteria_MatchesVisitor_WithEmptyDefinition_ThrowsException()
        {
            // Arrange
            var mockNumberOfVisitsProvider = MockNumberOfVisitsProvider();
            var criteria = new NumberOfVisitsPersonalisationGroupCriteria(mockNumberOfVisitsProvider.Object);

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