public LLTests() { // Change to "new YourClassLL<string>();" in order to test your code LL = new AnnLL <string>(); // Change to "new YourClassLL<MutableTest>();" in order to test your code LLM = new AnnLL <MutableTest>(); }
public void CloneValuesDeepCopyTest() { LLM.Add(new MutableTest(1)); LLM.Add(new MutableTest(2)); BadLinkedList <MutableTest> cloned = (BadLinkedList <MutableTest>)LLM.Clone(); Assert.AreEqual(LLM.Get(0), cloned.Get(0)); Assert.AreNotSame(LLM.Get(0), cloned.Get(0)); Assert.AreEqual(LLM.Get(1), cloned.Get(1)); Assert.AreNotSame(LLM.Get(1), cloned.Get(1)); }