private StudentRecord generateStudentRecordWithSampleTrimesters()
        {
            TrimesterPerformance tpf;
            StudentRecord        studRecord = new StudentRecord("ahmad", "12345", Gender.male, "*****@*****.**", "012-44444", "SE", 120);

            tpf = new TrimesterPerformance(2014, TrimesterMonths.JAN, Trimesters.Y1T1);
            tpf.AddUnitGrade(new UnitGrade("UECS1101", "somename", 40));
            tpf.AddUnitGrade(new UnitGrade("UECS1102", "somename", 80));
            tpf.AddUnitGrade(new UnitGrade("UECS1103", "somename", 80));
            studRecord.AddTrimesterPerformance(tpf);

            tpf = new TrimesterPerformance(2014, TrimesterMonths.MAY, Trimesters.Y1T2);
            tpf.AddUnitGrade(new UnitGrade("UECS1201", "somename", 80));
            tpf.AddUnitGrade(new UnitGrade("UECS1202", "somename", 80));
            tpf.AddUnitGrade(new UnitGrade("UECS1203", "somename", 80));
            studRecord.AddTrimesterPerformance(tpf);

            tpf = new TrimesterPerformance(2014, TrimesterMonths.OCT, Trimesters.Y1T3);
            tpf.AddUnitGrade(new UnitGrade("UECS1301", "somename", 40));
            tpf.AddUnitGrade(new UnitGrade("UECS1302", "somename", 40));
            tpf.AddUnitGrade(new UnitGrade("UECS1303", "somename", 80));
            studRecord.AddTrimesterPerformance(tpf);

            tpf = new TrimesterPerformance(2015, TrimesterMonths.JAN, Trimesters.Y2T1);
            tpf.AddUnitGrade(new UnitGrade("UECS2101", "somename", 50));
            tpf.AddUnitGrade(new UnitGrade("UECS2102", "somename", 50));
            tpf.AddUnitGrade(new UnitGrade("UECS2103", "somename", 50));
            studRecord.AddTrimesterPerformance(tpf);

            return(studRecord);
        }
        public void VerifyTrimesterOrder_YearMonthAndTrimesterOutOfOrderInTrimesterList_Exception()
        {
            StudentRecord        studRecord = new StudentRecord("ahmad", "12345", Gender.male, "*****@*****.**", "012-44444", "SE", 120);
            TrimesterPerformance tpf        = new TrimesterPerformance(2014, TrimesterMonths.JAN, Trimesters.Y1T1);

            studRecord.AddTrimesterPerformance(tpf);
            tpf = new TrimesterPerformance(2016, TrimesterMonths.MAY, Trimesters.Y1T2);
            studRecord.AddTrimesterPerformance(tpf);
            tpf = new TrimesterPerformance(2014, TrimesterMonths.JAN, Trimesters.Y2T3);
            studRecord.AddTrimesterPerformance(tpf);
            studRecord.VerifyTrimesterOrder();
        }
        public void VerifyTrimesterOrder_CompleteTrimestersSequence_NoException()
        {
            StudentRecord        studRecord = new StudentRecord("ahmad", "12345", Gender.male, "*****@*****.**", "012-44444", "SE", 120);
            TrimesterPerformance tpf        = new TrimesterPerformance(2014, TrimesterMonths.JAN, Trimesters.Y1T1);

            studRecord.AddTrimesterPerformance(tpf);
            tpf = new TrimesterPerformance(2014, TrimesterMonths.MAY, Trimesters.Y1T2);
            studRecord.AddTrimesterPerformance(tpf);
            tpf = new TrimesterPerformance(2014, TrimesterMonths.OCT, Trimesters.Y1T3);
            studRecord.AddTrimesterPerformance(tpf);
            tpf = new TrimesterPerformance(2015, TrimesterMonths.JAN, Trimesters.Y2T1);
            studRecord.AddTrimesterPerformance(tpf);
            tpf = new TrimesterPerformance(2015, TrimesterMonths.MAY, Trimesters.Y2T2);
            studRecord.AddTrimesterPerformance(tpf);
            tpf = new TrimesterPerformance(2015, TrimesterMonths.OCT, Trimesters.Y2T3);
            studRecord.AddTrimesterPerformance(tpf);
            tpf = new TrimesterPerformance(2016, TrimesterMonths.JAN, Trimesters.Y3T1);
            studRecord.AddTrimesterPerformance(tpf);
            tpf = new TrimesterPerformance(2016, TrimesterMonths.MAY, Trimesters.Y3T2);
            studRecord.AddTrimesterPerformance(tpf);
            tpf = new TrimesterPerformance(2016, TrimesterMonths.OCT, Trimesters.Y3T3);
            studRecord.AddTrimesterPerformance(tpf);
            studRecord.VerifyTrimesterOrder();
        }