Ejemplo n.º 1
0
        public void TestLokaleIDInSchema()
        {
            Skema lokaleSkema = service.CreateLokaleSkema("BH112");

            Assert.IsTrue(lokaleSkema.LectureList.Count > 0, "lecturelist is empty");

            foreach (Lecture item in lokaleSkema.LectureList)
            {
                Console.WriteLine(item.Place.LokaleKode);
                Assert.IsTrue(item.Place.LokaleKode == "BH112", "There is a lokale with an ID different from BH112");
            }
        }
Ejemplo n.º 2
0
        public ActionResult Room(string id)
        {
            Skema roomSchema = service.CreateLokaleSkema(id);

            return(View(roomSchema));
        }
Ejemplo n.º 3
0
        public static void Main(string[] args)
        {
            SchemaService service = new SchemaService();

            //IMoodle moodle = new DumbMoodle();
            ////SchemaPlanner planner = new SchemaPlanner();

            //foreach (var room in moodle.Rooms)
            //    Console.WriteLine(room);

            //Console.ReadLine();

            //foreach (var hold in moodle.Hold)
            //    Console.WriteLine(hold);

            //Console.ReadLine();

            //foreach (var teacher in moodle.Teachers)
            //    Console.WriteLine(teacher);

            //Console.ReadLine();

            //Console.WriteLine(moodle.LookupTeacher("PAN"));

            //Console.ReadLine();

            //Console.WriteLine(moodle.LookupHold("MTH2014"));

            //Console.ReadLine();

            //foreach (var teacherCode in moodle.Teachers.Select(t => t.LaererKode))
            //    Console.WriteLine(moodle.LookupTeacher(teacherCode));

            //Console.ReadLine();

            //foreach (var holdCode in moodle.Hold.Select(h => h.HoldCode))
            //    Console.WriteLine(moodle.LookupHold(holdCode));

            //Console.ReadLine();

            //foreach (var course in moodle.Courses)
            //    Console.WriteLine(course);

            //Console.ReadLine();


            // MasterSchema masterSchema = planner.GenerateSchema(moodle);



            //create a schema for kursus with this id ALG100:
            Skema kursusSkema = service.CreateKursusSkema("ALG100");

            foreach (var item in kursusSkema.LectureList)
            {
                Console.WriteLine(item.ToString());
            }

            Console.ReadLine();

            //create a schema for teacher with this initials: PJE
            Skema teacherSkema = service.CreateTeacherSkema("PAN");

            foreach (var item in teacherSkema.LectureList)
            {
                Console.WriteLine(item.ToString());
            }

            Console.ReadLine();

            //create a schema for lokale with this id: BH112
            Skema lokaleSkema = service.CreateLokaleSkema("BH112");

            foreach (var item in lokaleSkema.LectureList)
            {
                Console.WriteLine(item.ToString());
            }


            Console.ReadLine();

            //create a schema for a group/hold with id: MTH2014
            Skema holdSkema = service.CreateHoldSkema("MTH2014");

            foreach (var item in holdSkema.LectureList)
            {
                Console.WriteLine(item.ToString());
            }

            Console.ReadKey();
        }