Beispiel #1
0
        public void AddAndCheck_WhenItemHasBeenAddedBefore_ShouldReturnTrue()
        {
            var filter = new CountingBloomFilter <int>(50, 0.02);

            filter.Add(42);
            Assert.True(filter.AddAndCheck(42));
        }
 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();
     }));
 }