public void ThrowArgumentOutOfRangeExceptionWhenInvalidIndexIsRetrieved() { RecentlyUsedList<Employee> ob = new RecentlyUsedList<Employee>(2); Employee e1 = new Employee(); Employee e2 = new Employee(); Employee e3 = new Employee(); ob.MyInsert(e1); ob.MyInsert(e2); ob.MyInsert(e3); Assert.AreEqual(e3, ob[0]); Assert.AreEqual(e2, ob[1]); Assert.AreEqual(e1, ob[2]); }
public void ReturnETwoWhenFirstIndexIsRetrieved() { RecentlyUsedList<Employee> ob = new RecentlyUsedList<Employee>(2); Employee e1 = new Employee(); Employee e2 = new Employee(); ob.MyInsert(e1); ob.MyInsert(e2); Assert.AreEqual(e2, ob[0]); Assert.AreEqual(e1, ob[1]); }