35 references to AddHours
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
TokenCredentialTests.cs (1)
159var accesstoken = new AccessToken(token, DateTimeOffset.Now.AddHours(1));
Aspire.Azure.Npgsql.Tests (1)
AspireAzurePostgreSqlNpgsqlExtensionsTests.cs (1)
331var accesstoken = new AccessToken(token, DateTimeOffset.Now.AddHours(1));
Aspire.Hosting.Azure.Tests (12)
AzureBicepProvisionerTests.cs (2)
180new("mock-token", DateTimeOffset.UtcNow.AddHours(1)); 183ValueTask.FromResult(new AccessToken("mock-token", DateTimeOffset.UtcNow.AddHours(1)));
DefaultUserPrincipalProviderTests.cs (7)
104exp = DateTimeOffset.UtcNow.AddHours(1).ToUnixTimeSeconds(), 127exp = DateTimeOffset.UtcNow.AddHours(1).ToUnixTimeSeconds(), 151return new AccessToken(token, DateTimeOffset.UtcNow.AddHours(1)); 157return ValueTask.FromResult(new AccessToken(token, DateTimeOffset.UtcNow.AddHours(1))); 176return new AccessToken(token, DateTimeOffset.UtcNow.AddHours(1)); 186return ValueTask.FromResult(new AccessToken(token, DateTimeOffset.UtcNow.AddHours(1))); 197exp = DateTimeOffset.UtcNow.AddHours(1).ToUnixTimeSeconds(),
ProvisioningTestHelpers.cs (3)
135return new AccessToken(token, DateTimeOffset.UtcNow.AddHours(1)); 142return ValueTask.FromResult(new AccessToken(token, DateTimeOffset.UtcNow.AddHours(1))); 157exp = DateTimeOffset.UtcNow.AddHours(1).ToUnixTimeSeconds(),
Microsoft.AspNetCore.DataProtection.Extensions.Tests (4)
DataProtectionAdvancedExtensionsTests.cs (4)
47DateTimeOffset lowerBound = DateTimeOffset.UtcNow.AddHours(48); 49DateTimeOffset upperBound = DateTimeOffset.UtcNow.AddHours(48); 70DateTimeOffset lowerBound = DateTimeOffset.UtcNow.AddHours(48); 72DateTimeOffset upperBound = DateTimeOffset.UtcNow.AddHours(48);
Microsoft.AspNetCore.DataProtection.Tests (7)
KeyManagement\CacheableKeyRingTests.cs (3)
24var cacheableKeyRing = new CacheableKeyRing(cts.Token, now.AddHours(1), keyRing); 39var cacheableKeyRing = new CacheableKeyRing(cts.Token, now.AddHours(1), keyRing); 43Assert.False(CacheableKeyRing.IsValid(cacheableKeyRing, now.AddHours(1).UtcDateTime));
KeyManagement\DefaultKeyResolverTests.cs (3)
335var creation2 = creation1.AddHours(1); 336var activation2 = activation1.AddHours(1); 337var expiration2 = expiration1.AddHours(1);
KeyManagement\XmlKeyManagerTests.cs (1)
946var activationTime = DateTimeOffset.UtcNow.AddHours(1);
Microsoft.AspNetCore.HeaderParsing.Tests (1)
HeaderParsingFeatureTests.cs (1)
64var futureDate = DateTimeOffset.Now.AddHours(1).ToString("R", CultureInfo.InvariantCulture);
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
CookieBuilderTests.cs (1)
35Assert.Equal(now.AddHours(1), options.Expires);
Microsoft.AspNetCore.StaticAssets.Tests (2)
StaticAssetsIntegrationTests.cs (2)
825var pastDate = lastModified.AddHours(-1); 826var futureDate = lastModified.AddHours(1);
Microsoft.AspNetCore.StaticFiles.Tests (3)
CacheHeaderTests.cs (2)
240DateTimeOffset pastDate = lastModified.AddHours(-1); 241DateTimeOffset futureDate = lastModified.AddHours(1);
RangeHeaderTests.cs (1)
83req.Headers.Add("If-Modified-Since", original.Content.Headers.LastModified.Value.AddHours(-1).ToString("r"));
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheWithDatabaseTest.cs (1)
86new DistributedCacheEntryOptions().SetAbsoluteExpiration(testClock.UtcNow.AddHours(-1)));
SignalR.Client.FunctionalTestApp (2)
Startup.cs (2)
182var expiredCookieOptions = new CookieOptions() { Expires = DateTimeOffset.Now.AddHours(-1) }; 196cookieOptions.Expires = DateTimeOffset.Now.AddHours(-1);