Exemplo n.º 1
0
        public void AddAndCheck_WhenItemHasBeenAddedBefore_ShouldReturnTrue()
        {
            var filter = new CountingBloomFilter <int>(50, 0.02);

            filter.Add(42);
            Assert.True(filter.AddAndCheck(42));
        }
Exemplo n.º 2
0
 public Property AddAndCheck_WhenItemHasntBeenAddedBefore_ShouldReturnFalse()
 {
     return(Prop.ForAll(Arb.Default.Int32(), testData =>
     {
         var filter = new CountingBloomFilter <int>(50, 0.02, ByteConverter);
         (filter.AddAndCheck(testData)).ToProperty();
     }));
 }