29 references to AddSeconds
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
307DateTimeOffset newExpiry = now.AddSeconds(2);
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\DefaultInMemoryCircuitPersistenceProviderTest.cs (1)
92clock.UtcNow = clock.UtcNow.AddSeconds(2);
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
3178connection.AuthenticationExpiration = DateTimeOffset.Now.AddSeconds(-1);
Microsoft.AspNetCore.Identity.Specification.Tests (2)
UserManagerSpecificationTests.cs (2)
1289var user = CreateTestUser(lockoutEnd: DateTimeOffset.UtcNow.AddSeconds(-1)); 1306IdentityResultAssert.IsSuccess(await mgr.SetLockoutEndDateAsync(user, DateTimeOffset.UtcNow.AddSeconds(-1)));
Microsoft.AspNetCore.Identity.Test (3)
SecurityStampValidatorTest.cs (3)
81var properties = new AuthenticationProperties { IssuedUtc = DateTimeOffset.UtcNow.AddSeconds(-1), IsPersistent = isPersistent }; 141new AuthenticationProperties { IssuedUtc = DateTimeOffset.UtcNow.AddSeconds(-1) }, 182new AuthenticationProperties { IssuedUtc = DateTimeOffset.UtcNow.AddSeconds(-1) },
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
CacheTagHelperTest.cs (2)
406currentTime = currentTime.AddMinutes(5).AddSeconds(2); 459currentTime = currentTime.AddSeconds(35);
DistributedCacheTagHelperTest.cs (2)
445currentTime = currentTime.AddMinutes(5).AddSeconds(2); 507currentTime = currentTime.AddSeconds(35);
Microsoft.AspNetCore.ResponseCaching.Tests (2)
ResponseCachingMiddlewareTests.cs (1)
449now = new DateTimeOffset(now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second, now.Offset).AddSeconds(1); // Round up to seconds.
TestUtils.cs (1)
39headers.Expires = DateTimeOffset.Now.AddSeconds(int.Parse(expires, CultureInfo.InvariantCulture));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
CertificatePathWatcherTests.cs (3)
154fileProvider.SetLastModifiedTime(fileName, fileLastModifiedTime.AddSeconds(1)); 200fileProvider.SetLastModifiedTime(fileName, fileLastModifiedTime.AddSeconds(-1)); 394fileProvider.SetLastModifiedTime(fileName, restoredWithNewerLastModifiedTime ? fileLastModifiedTime.AddSeconds(1) : fileLastModifiedTime);
DateHeaderValueManagerTests.cs (1)
58var future = now.AddSeconds(10);
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
307DateTimeOffset newExpiry = now.AddSeconds(2);
Microsoft.Extensions.Caching.SqlServer.Tests (6)
SqlServerCacheWithDatabaseTest.cs (6)
260var expectedExpirationTime = testClock.UtcNow.AddSeconds(expected); 491var expectedExpiresAtTime = testClock.UtcNow.AddSeconds(15); 533Assert.Equal(utcNow.AddSeconds(5), cacheItemInfo.ExpiresAtTime); 543expectedExpirationTime: utcNow.AddSeconds(5)); 553expectedExpirationTime: utcNow.AddSeconds(5)); 608var expectedExpiresAtTime = testClock.UtcNow.AddSeconds(15);
Microsoft.Maui.Essentials (2)
WebAuthenticator\WebAuthenticatorResult.shared.cs (2)
120 return Timestamp.AddSeconds(i); 139 return Timestamp.AddSeconds(i);
Microsoft.Net.Http.Headers.Tests (2)
ContentDispositionHeaderValueTest.cs (1)
317var newDate = validDate.AddSeconds(1);
HeaderUtilitiesTest.cs (1)
38data.Add(date.AddSeconds(i), quoted);