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); }
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)); }
public FileWithContent CreateDiplomaSupplement(StudentBasedProxy student) { return(SendRequest <FileWithContent>("CreateDiplomaSupplementReport", GetDefaultParameters(), student.ToJson())); }
public FileWithContent CreateAcadem(StudentBasedProxy student) { return(SendRequest <FileWithContent>("CreateAcademReport", GetDefaultParameters(), student.ToJson())); }
public StudentExtendedProxy GetExtendedProxy(StudentBasedProxy basedProxy) { return(SendRequest <StudentExtendedProxy>("GetExtendedStudent", GetDefaultParameters(), basedProxy.ToJson())); }
public void Delete(StudentBasedProxy basedProxy) { SendRequest("DeleteStudent", GetDefaultParameters(), basedProxy.ToJson()); }