コード例 #1
0
        public async Task ProcessAuthorizeWithConsentAsync_no_user_should_return_error_page()
        {
            _context.HttpContext.SetUser(null);

            var result = await _subject.ProcessAuthorizeAfterConsentAsync(_context);

            result.Should().BeAssignableTo <ErrorPageResult>();
        }
コード例 #2
0
        public async Task ProcessAuthorizeWithConsentAsync_no_user_should_return_error_page()
        {
            _context.SetUser(null);

            var result = await _subject.ProcessAuthorizeAfterConsentAsync(_context);

            result.Should().BeOfType <AuthorizeResult>();
            ((AuthorizeResult)result).Response.IsError.Should().BeTrue();
        }
コード例 #3
0
        public async Task ProcessAuthorizeWithConsentAsync_no_id_param_should_return_error_page()
        {
            _mockUserConsentResponseMessageStore.Messages.Add("123", new Message <ConsentResponse>(new ConsentResponse()));
            _context.HttpContext.SetUser(_user);

            var result = await _subject.ProcessAuthorizeAfterConsentAsync(_context);

            result.Should().BeAssignableTo <ErrorPageResult>();
        }