public void GetNextStudentWhenAlreadyAtEnd()
        {
            //  Arrange:
            var db = new StudentRegistrationApp.Model.StudentRepository();
            //  Act:    The initial set up is for the first element to be the current item.
            var positionAtEnd = db.NextStudent();
            var result        = db.NextStudent();

            //  Assert: We should be on the 2nd item, i.e. the last item.
            Assert.AreEqual(positionAtEnd, result);
        }
        public void GetNextStudent()
        {
            //  Arrange:
            var db = new StudentRegistrationApp.Model.StudentRepository();
            //  Act:    The initial set up is for the first element to be the current item.
            var result = db.NextStudent();

            //  Assert: We should be on the 2nd item, i.e. the last item.
            Assert.AreEqual(result.Firstname, "Nancy");
        }
 public void GetPreviousStudent()
 {
     //  Arrange:
     var db = new StudentRegistrationApp.Model.StudentRepository();
     //  Act:    The initial set up is for the first element to be the current item.
     var positionAtEnd = db.NextStudent();
     var result = db.PreviousStudent();      // should move back to firstitem.
     //  Assert: We should be on the 2nd item, i.e. the last item.
     Assert.AreEqual(result.Firstname, "Tim");
 }
 public void GetNextStudentWhenAlreadyAtEnd()
 {
     //  Arrange:
     var db = new StudentRegistrationApp.Model.StudentRepository();
     //  Act:    The initial set up is for the first element to be the current item.
     var positionAtEnd = db.NextStudent();
     var result = db.NextStudent();
     //  Assert: We should be on the 2nd item, i.e. the last item.
     Assert.AreEqual(positionAtEnd, result);
 }