public void Remove_Matched_Collection_Notification_If_A_Broadcast_Notification_Is_Added()
        {
            var cache = new NotificationCache();

            cache.AddCollection("coll1");
            cache.AddCollection("coll2");
            cache.Collections.Should().HaveCount(2);

            cache.AddBroadcast("coll1");
            cache.Collections.Should().HaveCount(1);
            cache.Collections.Where(coll => coll == "coll2").Count().Should().Be(1);
        }
        public void Add_Collection_Notification()
        {
            var cache = new NotificationCache();

            cache.Collections.Should().BeEmpty();

            cache.AddCollection("coll1");
            cache.AddCollection("coll2");

            cache.Collections.Should().HaveCount(2);
            cache.Collections.Contains("coll1").Should().BeTrue();
            cache.Collections.Contains("coll2").Should().BeTrue();
            cache.Collections.Contains("coll3").Should().BeFalse();

            cache.Clear();
            cache.Collections.Should().BeEmpty();
        }
        public void Add_The_Collection_Notification_If_It_Does_Not_Match_With_Any_Broadcast()
        {
            var cache = new NotificationCache();

            cache.AddBroadcast("coll1");
            cache.AddBroadcast("coll2");

            cache.AddCollection("coll3");
            cache.Collections.Should().HaveCount(1);
        }
        public void Not_Add_The_Collection_Notification_If_It_Matches_With_Any_Broadcast()
        {
            var cache = new NotificationCache();

            cache.AddBroadcast("coll1");
            cache.AddBroadcast("coll2");

            cache.AddCollection("coll1");
            cache.Documents.Should().BeEmpty();
        }