Exemplo n.º 1
0
        public void ShouldAllowAllPathsWhenPassedBlob(string blob, string extension, int expectedInnerObserverCallCount)
        {
            //GIVEN
            var innerObserver = Substitute.For <PathChangesObserver>();
            var filter        = new FilteringObserver(innerObserver, blob);
            var changedPath   = new ChangedPath(Any.String() + extension);

            //WHEN
            filter.OnChanged(changedPath);

            //THEN
            innerObserver.Received(expectedInnerObserverCallCount).OnChanged(changedPath);
        }
Exemplo n.º 2
0
        public void ShouldNotIssueNotificationWhenNoneOfThePatternsIsMatchedByInput()
        {
            //GIVEN
            var nonMatchablePattern = "*.lolokimono";
            var innerObserver       = Substitute.For <PathChangesObserver>();
            var filter      = new FilteringObserver(innerObserver, nonMatchablePattern);
            var changedPath = new ChangedPath(Any.String());

            //WHEN
            filter.OnChanged(changedPath);

            //THEN
            innerObserver.Received(0).OnChanged(changedPath);
        }