public async Task RenewServiceTicketWithNotExistKey_ShouldStoreNewEntry() { // Arrange var key = Guid.NewGuid().ToString(); var expected = GenerateNewServiceTicket(); // Act await _serviceTickets.RenewAsync(key, expected).ConfigureAwait(false); // Assert var ignored = await _serviceTickets.RetrieveAsync(expected.TicketId).ConfigureAwait(false); Assert.Null(ignored); var actual = await _serviceTickets.RetrieveAsync(key).ConfigureAwait(false); Assert.NotNull(actual); }
public Task RenewAsync(string key, AuthenticationTicket ticket) { var serviceTicket = BuildServiceTicket(ticket); return(_store.RenewAsync(key, serviceTicket)); }