public void DoubleInsertTest() { HashTabSepChain a = new HashTabSepChain(); a.Insert(12); a.Insert(56); a.Insert(47); a.Insert(19); a.Insert(89); a.Insert(31); a.Insert(24); a.Insert(79); Assert.IsFalse(a.Insert(12)); Assert.IsFalse(a.Insert(79)); a.Print(); }
public void InsertTest() { HashTabSepChain a = new HashTabSepChain(); Assert.IsTrue(a.Insert(12)); Assert.IsTrue(a.Insert(56)); Assert.IsTrue(a.Insert(47)); Assert.IsTrue(a.Insert(19)); Assert.IsTrue(a.Insert(89)); Assert.IsTrue(a.Insert(31)); Assert.IsTrue(a.Insert(24)); Assert.IsTrue(a.Insert(79)); a.Print(); }
public void DeleteTest() { HashTabSepChain a = new HashTabSepChain(); a.Insert(12); a.Insert(56); a.Insert(47); a.Insert(19); a.Insert(89); a.Insert(31); a.Insert(24); a.Insert(79); Assert.IsTrue(a.Delete(79)); Assert.IsTrue(a.Delete(56)); Assert.IsTrue(a.Delete(12)); Assert.IsTrue(a.Delete(31)); Assert.IsFalse(a.Delete(100)); a.Print(); }
public void SearchTest() { HashTabSepChain a = new HashTabSepChain(); a.Insert(12); a.Insert(56); a.Insert(47); a.Insert(19); a.Insert(89); a.Insert(31); a.Insert(24); a.Insert(79); Assert.IsTrue(a.Search(12)); Assert.IsTrue(a.Search(56)); Assert.IsTrue(a.Search(47)); Assert.IsTrue(a.Search(19)); Assert.IsTrue(a.Search(89)); Assert.IsTrue(a.Search(31)); Assert.IsTrue(a.Search(24)); Assert.IsTrue(a.Search(79)); Assert.IsFalse(a.Search(100)); a.Print(); }