예제 #1
0
        public void DontDetectDuplicatesIfTimeSpanIsTooLong()
        {
            HtmlViewDuplicateEventFinder duplicateFinder = new HtmlViewDuplicateEventFinder();

            duplicateFinder.IsDuplicateEvent("abc");
            Thread.Sleep(300);
            Assert.IsFalse(duplicateFinder.IsDuplicateEvent("abc"));
        }
예제 #2
0
        public void CorrectlyDetectDuplicate()
        {
            HtmlViewDuplicateEventFinder duplicateFinder = new HtmlViewDuplicateEventFinder();

            duplicateFinder.IsDuplicateEvent("abc");
            Assert.IsTrue(duplicateFinder.IsDuplicateEvent("abc"));
            Assert.IsTrue(duplicateFinder.IsDuplicateEvent("abc"));
        }
예제 #3
0
        public void DontDetectDifferentEvents()
        {
            HtmlViewDuplicateEventFinder duplicateFinder = new HtmlViewDuplicateEventFinder();

            duplicateFinder.IsDuplicateEvent("abc");
            Assert.IsFalse(duplicateFinder.IsDuplicateEvent("zzz"));
            Assert.IsFalse(duplicateFinder.IsDuplicateEvent("yyy"));
        }
예제 #4
0
        public void FirstEventIsNotADuplicate()
        {
            HtmlViewDuplicateEventFinder duplicateFinder = new HtmlViewDuplicateEventFinder();

            Assert.IsFalse(duplicateFinder.IsDuplicateEvent("abc"));
        }