public void AddDisciplineFunctionTest_ShouldBeSuccess()
        {
            var discipline = new DisciplineExtendedProxy {
                DisciplineName = "nameOfDiscipline"
            };

            RunServer(new AddDisciplineFunction(DatabaseAuthorizer, databaseDisciplineEditor));
            SendRequest("AddDiscipline", GetDefaultParameters(), discipline.ToJson());

            A.CallTo(() => databaseDisciplineEditor.Add(discipline)).MustHaveHappened(Repeated.Exactly.Once);
        }
Пример #2
0
        private void LoadNewData()
        {
            var group = new GroupExtendedProxy {
                GroupName       = "Б08-191-2",
                SpecialtyNumber = 231000,
                SpecialtyName   = "Программная инженерия",
                FacultyName     = "Информатика и вычислительная техника"
            };

            databaseGroupEditor.Add(group);

            databaseDisciplineEditor.Add(new DisciplineExtendedProxy {
                DisciplineName = "Английский язык",
                ControlType    = ControlType.Exam,
                GroupName      = group.GroupName,
                ClassHours     = 32,
                TotalHours     = 48
            });
            databaseDisciplineEditor.Add(new DisciplineExtendedProxy {
                DisciplineName = "Архитектура ЭВМ",
                ControlType    = ControlType.CourseWork,
                GroupName      = group.GroupName,
                ClassHours     = 0,
                TotalHours     = 0
            });
            databaseDisciplineEditor.Add(new DisciplineExtendedProxy {
                DisciplineName = "Физика",
                ControlType    = ControlType.Credit,
                GroupName      = group.GroupName,
                ClassHours     = 32,
                TotalHours     = 48
            });
            databaseDisciplineEditor.Add(new DisciplineExtendedProxy {
                DisciplineName = "Вычислительная математика",
                ControlType    = ControlType.Credit,
                GroupName      = group.GroupName,
                ClassHours     = 16,
                TotalHours     = 16
            });
            databaseDisciplineEditor.Add(new DisciplineExtendedProxy {
                DisciplineName = "Инженерная графика",
                ControlType    = ControlType.CourseWork,
                GroupName      = group.GroupName,
                ClassHours     = 0,
                TotalHours     = 0
            });
            databaseDisciplineEditor.Add(new DisciplineExtendedProxy {
                DisciplineName = "Производственно-технологическая",
                ControlType    = ControlType.Practice,
                GroupName      = group.GroupName,
                ClassHours     = 4,
                TotalHours     = 0
            });
            databaseDisciplineEditor.Add(new DisciplineExtendedProxy {
                DisciplineName = "Междисциплинарный экзамен по направлению",
                ControlType    = ControlType.StateExam,
                GroupName      = group.GroupName,
                ClassHours     = 0,
                TotalHours     = 0
            });

            databaseStudentEditor.Add(new StudentExtendedProxy {
                FirstName               = "Владимир",
                SecondName              = "Новоселов",
                ThirdName               = "Олегович",
                DateOfBirth             = new DateTime(1995, 8, 9),
                PreviousEducationName   = "аттестат о среднем (полном) общем образовании",
                PreviousEducationYear   = 2011,
                EnrollmentName          = "государственное образовательное учреждение высшего профессионального образования \"Ижевский государственный технический университет\" (очная форма)",
                EnrollmentYear          = 2011,
                ExpulsionName           = "федеральном государственном бюджетном образовательном учреждении высшего профессионального образования \"Ижевский государственный технический университет\" (очная форма)",
                ExpulsionYear           = 2015,
                ExpulsionOrderDate      = new DateTime(2015, 1, 1),
                ExpulsionOrderNumber    = 3764,
                DiplomaTopic            = "Эта программа",
                DiplomaAssessment       = Assessment.Excellent,
                ProtectionDate          = DateTime.Now,
                ProtocolNumber          = "2015-231000-28",
                RegistrationNumber      = "76 004",
                RegistrationDate        = DateTime.Now,
                GroupName               = group.GroupName,
                AssessmentByDisciplines = new[] {
                    new AssessmentByDiscipline {
                        NameOfDiscipline = "Английский язык",
                        Assessment       = Assessment.Good
                    },
                    new AssessmentByDiscipline {
                        NameOfDiscipline = "Архитектура ЭВМ",
                        Assessment       = Assessment.Excellent
                    },
                    new AssessmentByDiscipline {
                        NameOfDiscipline = "Физика",
                        Assessment       = Assessment.Credited
                    },
                    new AssessmentByDiscipline {
                        NameOfDiscipline = "Вычислительная математика",
                        Assessment       = Assessment.Credited
                    },
                    new AssessmentByDiscipline {
                        NameOfDiscipline = "Инженерная графика",
                        Assessment       = Assessment.Excellent
                    },
                    new AssessmentByDiscipline {
                        NameOfDiscipline = "Производственно-технологическая",
                        Assessment       = Assessment.Excellent
                    },
                    new AssessmentByDiscipline {
                        NameOfDiscipline = "Междисциплинарный экзамен по направлению",
                        Assessment       = Assessment.Excellent
                    }
                }
            });
        }
Пример #3
0
 protected override void Run(NameValues parameters, byte[] requestBody)
 {
     databaseDisciplineEditor.Add(requestBody.FromJson <DisciplineExtendedProxy>());
 }