public void DeleteStudentFunctionTest_ShouldBeSuccess()
        {
            var student = new StudentBasedProxy {
                FirstName = "firstName"
            };

            RunServer(new DeleteStudentFunction(DatabaseAuthorizer, databaseStudentEditor));
            SendRequest("DeleteStudent", GetDefaultParameters(), student.ToJson());

            A.CallTo(() => databaseStudentEditor.Delete(student)).MustHaveHappened(Repeated.Exactly.Once);
        }
예제 #2
0
        public void GetExtendedStudentFunctionTest_ShouldBeSuccess()
        {
            var inputBasedStudent = new StudentBasedProxy {
                FirstName = "firstName"
            };
            var inputExtendedStudent = new StudentExtendedProxy {
                FirstName = "firstName"
            };

            A.CallTo(() => databaseStudentReader.GetExtendedProxy(inputBasedStudent)).Returns(inputExtendedStudent);

            RunServer(new GetExtendedStudentFunction(DatabaseAuthorizer, databaseStudentReader));
            var receivedStudent = SendRequest <StudentExtendedProxy>("GetExtendedStudent", GetDefaultParameters(), inputBasedStudent.ToJson());

            A.CallTo(() => databaseStudentReader.GetExtendedProxy(inputBasedStudent)).MustHaveHappened(Repeated.Exactly.Once);
            Assert.That(receivedStudent, Is.EqualTo(inputExtendedStudent));
        }
예제 #3
0
 public FileWithContent CreateDiplomaSupplement(StudentBasedProxy student)
 {
     return(SendRequest <FileWithContent>("CreateDiplomaSupplementReport", GetDefaultParameters(), student.ToJson()));
 }
예제 #4
0
 public FileWithContent CreateAcadem(StudentBasedProxy student)
 {
     return(SendRequest <FileWithContent>("CreateAcademReport", GetDefaultParameters(), student.ToJson()));
 }
예제 #5
0
 public StudentExtendedProxy GetExtendedProxy(StudentBasedProxy basedProxy)
 {
     return(SendRequest <StudentExtendedProxy>("GetExtendedStudent", GetDefaultParameters(), basedProxy.ToJson()));
 }
 public void Delete(StudentBasedProxy basedProxy)
 {
     SendRequest("DeleteStudent", GetDefaultParameters(), basedProxy.ToJson());
 }