587 references to Now
Aspire.Cli.Tests (3)
Aspire.Dashboard (1)
Aspire.Dashboard.Tests (11)
TelemetryRepositoryTests\TelemetryRepositoryTests.cs (10)
68CreateLogRecord(time: DateTime.Now, message: "1", severity: SeverityNumber.Error),
91CreateSumMetric(metricName: "test", startTime: DateTime.Now.AddMinutes(1)),
92CreateSumMetric(metricName: "test", startTime: DateTime.Now.AddMinutes(2)),
93CreateSumMetric(metricName: "test2", startTime: DateTime.Now.AddMinutes(1)),
101CreateSumMetric(metricName: "test", startTime: DateTime.Now.AddMinutes(1)),
102CreateHistogramMetric(metricName: "test2", startTime: DateTime.Now.AddMinutes(1))
125CreateSpan(traceId: "1", spanId: "1-1", startTime: DateTime.Now.AddMinutes(1), endTime: DateTime.Now.AddMinutes(10)),
126CreateSpan(traceId: "1", spanId: "1-2", startTime: DateTime.Now.AddMinutes(5), endTime: DateTime.Now.AddMinutes(10), parentSpanId: "1-1")
Aspire.Hosting.Tests (1)
AuthSamples.FunctionalTests (4)
CustomPolicyProviderTests.cs (4)
51var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture));
67var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 5)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture));
82var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 55)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture));
98var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture));
AzureContainerApps.ApiService (1)
ClaimsTransformation (1)
Client.ExpectedExceptions.IntegrationTests (12)
Contract.Message.IntegrationTests (2)
Contract.XmlSerializer.IntegrationTests (6)
CustomPolicyProvider (2)
Deployers.ApiService (1)
dotnet-svcutil.xmlserializer.IntegrationTests (6)
dotnet-svcutil-lib (8)
dotnet-svcutil-lib.Tests (1)
HostedBlazorWebassemblyApp.Server (1)
HttpStress (1)
IdeCoreBenchmarks (28)
JwtClientSample (1)
Keycloak.ApiService (1)
LocalizationSample (6)
Microsoft.Analyzers.Local.Tests (2)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Authentication.Test (10)
Microsoft.AspNetCore.Components.Forms.Tests (1)
Microsoft.AspNetCore.Components.Tests (11)
Microsoft.AspNetCore.Http.Extensions.Tests (4)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.Identity.Specification.Tests (1)
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
Microsoft.AspNetCore.OpenApi.Tests (59)
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (18)
61builder.MapGet("/api", () => new Todo(1, "Test Title", true, DateTime.Now));
173static Todo? GetTodo() => Random.Shared.Next() < 0.5 ? new Todo(1, "Test Title", true, DateTime.Now) : null;
234static Task<Todo?> GetTodoAsync() => Task.FromResult(Random.Shared.Next() < 0.5 ? new Todo(1, "Test Title", true, DateTime.Now) : null);
281static ValueTask<Todo?> GetTodoValueTaskAsync() => ValueTask.FromResult(Random.Shared.Next() < 0.5 ? new Todo(1, "Test Title", true, DateTime.Now) : null);
440[new Todo(1, "Test", true, DateTime.Now)] : null;
442[new Todo(1, "Test", true, DateTime.Now)] : null;
444[new Todo(1, "Test", true, DateTime.Now)] : null;
557builder.MapGet("/api", () => new TodoWithDueDate(1, "Test Title", true, DateTime.Now, DateTime.Now.AddDays(1)));
611builder.MapGet("/api", () => new Result<Todo>(true, new TodoWithDueDate(1, "Test Title", true, DateTime.Now, DateTime.Now.AddDays(1)), null));
719builder.MapGet("/api", () => TypedResults.Created("/test/1", new { Id = 1, Name = "Test", Todo = new Todo(1, "Test", true, DateTime.Now) }));
781builder.MapGet("/", () => TypedResults.Ok<List<Todo>>([new Todo(1, "Test Title", true, DateTime.Now), new Todo(2, "Test Title 2", false, DateTime.Now)]));
828builder.MapGet("/", () => TypedResults.Ok<PaginatedItems<Todo>>(new(0, 1, 5, 50, [new Todo(1, "Test Title", true, DateTime.Now), new Todo(2, "Test Title 2", false, DateTime.Now)])));
968builder.MapGet("/", () => new ClassWithObjectProperty { Object = new Todo(1, "Test Title", true, DateTime.Now) });
1040internal Todo Get() => new(1, "Write test", false, DateTime.Now);
Transformers\DocumentTransformerTests.cs (3)
168builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
196builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
223builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\OperationTransformerTests.cs (4)
406builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
433builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
460builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
461builder.MapGet("/todo-2", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\SchemaTransformerTests.cs (18)
74builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
111builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
129builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
182builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
213builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
243builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
266builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
290builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
328builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
365builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
391builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
527builder.MapGet("/list-of-todo", () => new List<Todo> { new Todo(1, "Item1", false, DateTime.Now) });
723builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
781builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
808builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
835builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
861builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
900builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\TypeBasedTransformerLifetimeTests.cs (13)
16builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
38builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
64builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
90builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
115builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
137builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
162builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
188builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
213builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
234builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
257builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
283builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
309builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Microsoft.AspNetCore.Routing.Tests (1)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
Microsoft.AspNetCore.Testing.Tests (2)
Microsoft.Build.Framework (1)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (9)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
Microsoft.CodeAnalysis.UnitTests (5)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
SolutionTests\SolutionWithSourceGeneratorTests.cs (7)
886identity, DateTime.Now, SourceText.From("// Frozen Document"));
913[(sourceGeneratedDocument1.Identity, DateTime.Now, SourceText.From("// Frozen 1")), (sourceGeneratedDocument2.Identity, DateTime.Now, SourceText.From("// Frozen 2"))]);
1274identity, DateTime.Now, SourceText.From("// Frozen Document"));
1311identity, DateTime.Now, SourceText.From("// Frozen Document"));
1342identity, DateTime.Now, SourceText.From("// Frozen Document"));
1377identity, DateTime.Now, SourceText.From("// Frozen Document"));
Microsoft.Data.Analysis.Interactive (1)
Microsoft.Data.Analysis.Tests (1)
Microsoft.DotNet.Baselines.Tasks (1)
Microsoft.DotNet.Build.Tasks.Installers (1)
Microsoft.DotNet.RemoteExecutor (1)
Microsoft.DotNet.SignCheckTask (2)
Microsoft.DotNet.SourceBuild.Tasks (2)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (2)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Tests (1)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (4)
Microsoft.Extensions.Validation.Tests (2)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.ML.Samples (2)
Microsoft.ML.Tests (1)
Microsoft.VisualBasic.Core (3)
Microsoft.VisualBasic.Forms.Tests (3)
Microsoft.VisualBasic.Tests (1)
Microsoft.VisualStudio.LanguageServices (2)
MinimalSample (1)
MinimalSampleOwin (1)
MvcFormSample (1)
OutputCachingSample (2)
PresentationBuildTasks (1)
PresentationCore (83)
PresentationFramework (21)
PresentationUI (3)
QueueSharing (1)
ReachFramework (2)
Redis.ApiService (3)
Roslyn.Test.Performance.Utilities (2)
Roslyn.VisualStudio.Next.UnitTests (2)
RunTests (2)
Sample (6)
Endpoints\MapResponsesEndpoints.cs (4)
11responses.MapGet("/200-add-xml", () => new TodoWithDueDate(1, "Test todo", false, DateTime.Now.AddDays(1), DateTime.Now))
14responses.MapGet("/200-only-xml", () => new TodoWithDueDate(1, "Test todo", false, DateTime.Now.AddDays(1), DateTime.Now))
ScenarioTests.Common.Tests (5)
Security.TransportSecurity.IntegrationTests (1)
SecurityWebSite (1)
SelfHostServer (1)
ServiceBusWorker (1)
SessionSample (1)
SignalR.Client.FunctionalTestApp (1)
Sockets.FunctionalTests (4)
Stress.ApiService (1)
System.ComponentModel.TypeConverter (1)
System.Diagnostics.Process (1)
System.Diagnostics.TextWriterTraceListener (1)
System.DirectoryServices.Protocols (2)
System.Drawing.Common.Tests (1)
System.Linq.Parallel (8)
System.Net.Mail (1)
System.Net.Primitives (1)
System.Net.Requests (4)
System.Net.WebClient (1)
System.Private.CoreLib (4)
System.Private.Windows.Core.Tests (6)
System.Private.Xml (5)
System.Runtime.Caching (8)
System.Security.Cryptography (3)
System.Security.Cryptography.Pkcs (1)
System.ServiceModel.Primitives (3)
System.ServiceModel.Primitives.Tests (2)
System.Windows.Forms (26)
System.Windows.Forms.Design (1)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Windows.Forms.Tests (95)
TestingAppHost1.MyWebApp (1)
Wasm.Performance.ConsoleHost (2)
WebPubSubWeb (1)
XmlFileLogger (1)
xunit.console (1)
Yarp.Backend (1)