コード例 #1
0
        public void AddDataTest()
        {
            Bloom  MyBloom = new Bloom();
            string data    = "Hello Bloom Filter";

            MyBloom.AddData(data);
            Assert.AreEqual("success", MyBloom.AddData(data));
        }
コード例 #2
0
        public void Test()
        {
            var myBloom = new Bloom();
            var data    = "Hello Bloom Filter";

            myBloom.AddData(data);

            var data2 = "Hello Bloom Filter";

            Assert.AreEqual(true, myBloom.LookUp(data2));

            myBloom = new Bloom();

            myBloom.AddData("apple");
            myBloom.AddData("orange");
            myBloom.AddData("banana");

            Assert.AreEqual(true, myBloom.LookUp("banana"));
        }
コード例 #3
0
        public void LookUpTest()
        {
            Bloom  MyBloom = new Bloom();
            string data    = "Hello Bloom Filter";

            MyBloom.AddData(data);
            string data2 = "Hello Bloom Filter";

            Assert.AreEqual(true, MyBloom.LookUp(data2));
        }