Exemplo n.º 1
0
        public void RegexSelectorMatches()
        {
            var events = GetBasicCheckoutEvents();
            var script =
                @"/(Catalog|HomePage)\.Load/";

            Assert.AreEqual(5, ChronEx.MatchCount(script, events));
        }
Exemplo n.º 2
0
        public void dotMatchesEveryEvent()
        {
            var events = GetBasicCheckoutEvents();
            var script =
                @".";

            Assert.AreEqual(36, ChronEx.MatchCount(script, events));
        }
Exemplo n.º 3
0
        public void CountOfASingleSelector()
        {
            var events = GetBasicCheckoutEvents();
            var script =
                @"Catalog.Data.Render";

            Assert.AreEqual(3, ChronEx.MatchCount(script, events));
        }
Exemplo n.º 4
0
        public void NegationNegatesAMatch()
        {
            var events = GetBasicCheckoutEvents();
            var script =
                @"Homepage.Link.Clicked
!Catalog.Load";

            Assert.AreEqual(1, ChronEx.MatchCount(script, events));
        }
Exemplo n.º 5
0
        public void SelectorAndDotAndSelectorMatch()
        {
            var events = GetBasicCheckoutEvents();
            //this pattern will only have one match
            var script =
                @"ItemPage.Load
ItemPage.Render
ItemPage.Accessories.MoreDetailLink.Clicked";

            // this will now match 2 (including the session.end
            Assert.AreEqual(1, ChronEx.MatchCount(script, events));
            script =
                @"ItemPage.Load
ItemPage.Render
.";
            Assert.AreEqual(2, ChronEx.MatchCount(script, events));
        }