示例#1
0
        public void PagesViewedPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionForPagesNotViewedAny_WithPageNotViewed_ReturnsTrue()
        {
            // Arrange
            var mockPagesViewedProvider = MockPagesViewedProvider();
            var criteria   = new PagesViewedPersonalisationGroupCriteria(mockPagesViewedProvider.Object);
            var definition = string.Format(DefinitionFormat, "NotViewedAny", "1004");

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

            // Assert
            Assert.IsTrue(result);
        }
示例#2
0
        public void PagesViewedPersonalisationGroupCriteria_MatchesVisitor_WithDefinitionForPagesViewedAll_WithPagesViewedAndMore_ReturnsTrue()
        {
            // Arrange
            var mockPagesViewedProvider = MockPagesViewedProvider(new[] { 1000, 1001, 1002, 1003, 1004 });
            var criteria   = new PagesViewedPersonalisationGroupCriteria(mockPagesViewedProvider.Object);
            var definition = string.Format(DefinitionFormat, "ViewedAll", "1001,1000,1002");

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

            // Assert
            Assert.IsTrue(result);
        }