Ejemplo n.º 1
0
        public async Task <IActionResult> Delete(string id, CancellationToken cancellationToken)
        {
            if (!string.IsNullOrEmpty(id) && await _helpersManagementService.DeleteHelper(id, AuthService.ReadCookie(HttpContext, AppSettings.CookieTokenName, true), cancellationToken))
            {
                return(Json(new { success = true }));
            }

            CheckUnexpectedErrors();
            return(PartialView("Delete"));
        }
Ejemplo n.º 2
0
        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 void TestOfDeletingSpecifiedHelper()
 {
     Assert.True(_helpersManagementService.DeleteHelper(_testingHelper.Id, _token.Jwt).Result);
 }