コード例 #1
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);
        }
コード例 #2
0
        public async Task <IActionResult> Index(CancellationToken cancellationToken)
        {
            List <Helper> helpers = await _helpersManagementService.GetAllHelpers(AuthService.ReadCookie(HttpContext, AppSettings.CookieTokenName, true), cancellationToken);

            return(View(helpers.OrderByDescending(x => x.Created).ThenByDescending(x => x.LastModified).ToList()));
        }
コード例 #3
0
 public void TestOfGettingAllHelpers()
 {
     Assert.NotNull(_helpersManagementService.GetAllHelpers(_token.Jwt).Result);
 }