public async void HeleprsFunctinalityTest() { _token = await _accountManagementService.SignIn(TestingObjectProvider.Instance.Login); Assert.NotNull(_token); var helper = TestingObjectProvider.Instance.Helper; Assert.NotNull(_helpersManagementService.GetAllHelpers(_token.Jwt).Result); Assert.True(_helpersManagementService.CreateHelper(helper, _token.Jwt).Result); Assert.True(_helpersManagementService.DeleteHelper(helper.Id, _token.Jwt).Result); Assert.NotNull(_helpersManagementService.GetHelper(helper.Id, _token.Jwt).Result); Assert.True(_helpersManagementService.UpdateHelper(helper, _token.Jwt).Result); }
public async Task <IActionResult> Edit( [Bind("Id, Category, Name, Surname, PhoneNumber, Email, Address, Notes, Created")] Helper helper, CancellationToken cancellationToken) { if (helper != null && ModelState.IsValid) { if (await _helpersManagementService.UpdateHelper(helper, AuthService.ReadCookie(HttpContext, AppSettings.CookieTokenName, true), cancellationToken)) { return(Json(new { success = true })); } CheckUnexpectedErrors(); } return(PartialView(helper)); }
public void TestOfUpdatingHelper() { Assert.True(_helpersManagementService.UpdateHelper(_testingHelper, _token.Jwt).Result); }