public void AddToHeadTest() { UniqueList<int> list = new UniqueList<int>(); bool wasThrown = false; try { list.AddToHead(1); list.AddToHead(1); } catch (DublicateElementException) { wasThrown = true; } Assert.IsTrue(wasThrown); }
public void AddToHeadTest1() { list.AddToHead(1); Assert.IsFalse(list.IsEmpty()); Assert.IsTrue(list.IsContaining(1)); }