示例#1
0
        public void AddTest()
        {
            HashTableArray repository = new HashTableArray(1, new HashFuctionExample());

            repository.Add("1", "item 1");
            Assert.IsNotNull(repository.Find("1"));
            Assert.AreEqual("item 1", repository.Find("1"));
        }
示例#2
0
        public void RemoveTest()
        {
            HashTableArray repository = new HashTableArray(1, new HashFuctionExample());

            repository.Add("1", "item 1");
            repository.Remove("1");
            Assert.IsNull(repository.Find("1"));
        }
示例#3
0
        public void AddExistingKeyTest()
        {
            HashTableArray repository = new HashTableArray(2, new HashFuctionExample());

            repository.Add("1", "item 1");
            repository.Add("1", "item 1-2");
            Assert.AreEqual("item 1-2", repository.Find("1"));
        }