Ejemplo n.º 1
0
        public void testAddPeriod()
        {
            Student st = new Student();
            Period  pd = new Period();

            st.StudentID = "1223";
            st.FirstName = "sample";
            contoller.addOrUpdateStudent(st);
            pd.PeriodID   = 1;
            pd.PeriodName = "term1";
            contoller.addOrUpdatePeriod(st, pd);
            //pd.PeriodID = 1;
            //pd.PeriodName = "term33";
            //contoller.addOrUpdatePeriod(st, pd);
            int asd = contoller.getStudent("1223").RptCard.Periods.Count;

            Assert.AreEqual(contoller.getStudent("1223").RptCard.Periods.Count, asd);
            Assert.AreEqual(contoller.getPeriod(st, 1), pd);
            Assert.AreEqual(contoller.getPeriodByName(st, "term1").PeriodName, pd.PeriodName);
            //Test if the period is added to a student
        }