Example #1
0
        public static void TestAddAtStartInternal(IStudentList list)
        {
            Student student = new Student("Meher", 23, 7777, 1.0);

            list.AddAtStart(student);
            list.PrintList();
        }
Example #2
0
 public static void InitializeTests(TestContext context)
 {
     //Create new Student List if one doesn't exist yet
     if (null == (object)m_studentList)
     {
         //Populate m_studentList with StudentDictionary
         m_studentList = new StudentDictionary();
     }
 }
 public static void InitializeTests(TestContext context)
 {
     //Create new Student List if one doesn't exist yet
     if(null == (object) m_studentList)
     {
         //Populate m_studentList with StudentDictionary
         m_studentList = new StudentDictionary();
     }
 }
Example #4
0
        public void TestAddAtStartInternal(IStudentList list)
        {
            _students.ForEach(list.AddAtStart);

            var reversed = new List <Student>(_students);

            reversed.Reverse();

            Assert.True(list.IsSameAs(reversed));
        }
Example #5
0
 internal static bool IsSameAs(this IStudentList a, IEnumerable <Student> b) =>
 a.ToList().SequenceEqual(b, new StudentEqualityComparer());
Example #6
0
 private static List <Student> ToList(this IStudentList list) =>
 Enumerable.Range(0, list.Length()).Select(list.GetStudentAt).ToList();