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")); }
public void RemoveTest() { HashTableArray repository = new HashTableArray(1, new HashFuctionExample()); repository.Add("1", "item 1"); repository.Remove("1"); Assert.IsNull(repository.Find("1")); }
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")); }