public ActionResult ViewSchoolBusiness(int id) { if (id > 0) { var model = new SchoolBusinessService().GetSchoolBusiness(id); return(View(model)); } return(View()); }
public async Task SchoolBusinessServiceTest_Register_Failure() { //assemble _mockSchoolDataService.Setup(m => m.Register(It.IsAny <RegistrationRequest>())).Throws(new Exception()); ISchoolBusinessService schoolBusinessService = new SchoolBusinessService(_mockSchoolDataService.Object, _mockLoggingService.Object); //act var res = await schoolBusinessService.Register(It.IsAny <RegistrationRequest>()); //assert res.Should().BeFalse(); }
public async Task SchoolBusinessServiceTest_Register_Success() { //assemble _mockSchoolDataService.Setup(m => m.Register(It.IsAny <RegistrationRequest>())).Returns(Task.FromResult(true)); ISchoolBusinessService schoolBusinessService = new SchoolBusinessService(_mockSchoolDataService.Object, _mockLoggingService.Object); //act var res = await schoolBusinessService.Register(It.IsAny <RegistrationRequest>()); //assert res.Should().BeTrue(); }
public JsonResult SchoolBusinesssByPaging(DataTablesPaging request) { var view = new SchoolBusinessService().GetSchoolBusinesssByPaging(request); return(Json(view, JsonRequestBehavior.AllowGet)); }
public JsonResult SchoolBusinesss() { var items = new SchoolBusinessService().GetSchoolBusinesss(); return(Json(items, JsonRequestBehavior.AllowGet)); }
public void SchoolBusinessServiceTest_Create_DataServiceNullError() { ISchoolBusinessService schoolBusinessService = new SchoolBusinessService(null, _mockLoggingService.Object); schoolBusinessService.Should().NotBeNull(); }
public void SchoolBusinessServiceTest_Create_LoggingNullError() { ISchoolBusinessService schoolBusinessService = new SchoolBusinessService(_mockSchoolDataService.Object, null); schoolBusinessService.Should().NotBeNull(); }
public void SchoolBusinessServiceTest_Create_Success() { ISchoolBusinessService schoolBusinessService = new SchoolBusinessService(_mockSchoolDataService.Object, _mockLoggingService.Object); schoolBusinessService.Should().NotBeNull(); }