public void FindKey() { //also a test of the DisplayList method linkedList.AddHead('a'); //tail linkedList.AddHead('b'); linkedList.AddHead('c'); linkedList.AddHead('d'); //head Assert.AreEqual(true, linkedList.FindKey('a')); //first run Assert.AreEqual(true, linkedList.FindKey('a')); //second run of same value Assert.AreEqual(true, linkedList.FindKey('a')); //third run Assert.AreEqual(false, linkedList.FindKey('F')); }
public void FindKey() { //also a test of the DisplayList method studentList.AddHead(studentA); //tail studentList.AddHead(studentB); studentList.AddHead(studentA); studentList.AddHead(studentD); //head Assert.AreEqual(true, studentList.FindKey(studentA)); //first run Assert.AreEqual(true, studentList.FindKey(studentA)); //second run of same value Assert.AreEqual(true, studentList.FindKey(studentA)); //third run Assert.AreEqual(false, studentList.FindKey(studentZ)); }