public void GetTheFirstStudent()
        {
            //  Arrange:
            var db = new StudentRegistrationApp.Model.StudentRepository();
            //  Act:
            var result = db.FirstStudent();

            //  Assert:
            Assert.AreEqual(result.Firstname, "Tim");
        }
        public void GetPreviousStudentWhenAlreadyAtFirst()
        {
            //  Arrange:
            var db = new StudentRegistrationApp.Model.StudentRepository();
            //  Act:    The initial set up is for the first element to be the current item.
            var positionAtStart = db.FirstStudent();
            var result          = db.PreviousStudent(); // should move back to firstitem.

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