コード例 #1
0
        public async Task corrupt_properties_entry_should_clear_entry()
        {
            _stubAuthHandler.User = _user;

            await _subject.AddClientIdAsync("client");

            var item = _stubAuthHandler.Properties.First();

            _stubAuthHandler.Properties[item.Key] = "junk";

            var clients = await _subject.GetClientListAsync();

            clients.Should().BeEmpty();
            _stubAuthHandler.Properties.Count.Should().Be(0);
        }
コード例 #2
0
        public async Task corrupt_properties_entry_should_clear_entry()
        {
            _mockAuthenticationHandler.Result = AuthenticateResult.Success(new AuthenticationTicket(_user, _props, "scheme"));

            await _subject.AddClientIdAsync("client");

            var item = _props.Items.First();

            _props.Items[item.Key] = "junk";

            var clients = await _subject.GetClientListAsync();

            clients.Should().BeEmpty();
            _props.Items.Count.Should().Be(0);
        }
コード例 #3
0
        public async Task corrupt_properties_entry_should_clear_entry()
        {
            _mockHttpContext.SetUser(_user, _props);

            await _subject.AddClientIdAsync("client");

            var item = _mockHttpContext.AuthenticationService.Result.Properties.Items.First();

            _props.Items[item.Key] = "junk";

            var clients = await _subject.GetClientListAsync();

            clients.Should().BeEmpty();
            _props.Items.Count.Should().Be(0);
        }