685 references to RootElement
aspire (57)
Acquisition\InstallSidecarReader.cs (7)
158if (doc.RootElement.ValueKind != JsonValueKind.Object)
164Source: ReadOptionalString(doc.RootElement, "source"),
165Channel: ReadOptionalString(doc.RootElement, "channel"),
166Version: ReadOptionalString(doc.RootElement, "version"),
167Commit: ReadOptionalString(doc.RootElement, "commit"),
168NuGetServiceIndexOverride: ReadOptionalString(doc.RootElement, "nugetServiceIndexOverride"),
169Packages: ReadOptionalString(doc.RootElement, "packages"));
Aspire.Acquisition.Tests (10)
Aspire.Cli.EndToEnd.Tests (28)
Aspire.Cli.Tests (138)
Commands\LsCommandTests.cs (17)
160Assert.Equal(JsonValueKind.Array, document.RootElement.ValueKind);
161Assert.Equal(0, document.RootElement.GetArrayLength());
243Assert.Equal(JsonValueKind.Array, document.RootElement.ValueKind);
244Assert.Equal(2, document.RootElement.GetArrayLength());
275Assert.Equal(JsonValueKind.Array, document.RootElement.ValueKind);
276Assert.Equal(0, document.RootElement.GetArrayLength());
319Assert.Equal(JsonValueKind.Object, document.RootElement.ValueKind);
323Assert.Equal(appHostPath1, firstCandidate.RootElement.GetProperty("path").GetString());
324Assert.Equal(KnownLanguageId.CSharp, firstCandidate.RootElement.GetProperty("language").GetString());
325Assert.Equal("buildable", firstCandidate.RootElement.GetProperty("status").GetString());
328Assert.Equal(appHostPath2, secondCandidate.RootElement.GetProperty("path").GetString());
329Assert.Equal(KnownLanguageId.TypeScript, secondCandidate.RootElement.GetProperty("language").GetString());
330Assert.Equal("possibly-unbuildable", secondCandidate.RootElement.GetProperty("status").GetString());
406Assert.Equal(appHostPathZ, first.RootElement.GetProperty("path").GetString());
407Assert.Equal(appHostPathA, second.RootElement.GetProperty("path").GetString());
408Assert.Equal(appHostPathM, third.RootElement.GetProperty("path").GetString());
449Assert.Equal(appHostPath, candidate.RootElement.GetProperty("path").GetString());
Aspire.Components.Common.TestUtilities (2)
Aspire.Dashboard (12)
Model\GenAI\GenAIMessages.cs (12)
215if (!doc.RootElement.TryGetProperty("type", out var typeProp))
224MessagePart.TextType => Deserialize<TextPart>(doc.RootElement, options),
225MessagePart.ToolCallType => TryParseStringArguments(Deserialize<ToolCallRequestPart>(doc.RootElement, options)),
226MessagePart.ToolCallResponseType => Deserialize<ToolCallResponsePart>(doc.RootElement, options),
227MessagePart.BlobType => Deserialize<BlobPart>(doc.RootElement, options),
228MessagePart.FileType => Deserialize<FilePart>(doc.RootElement, options),
229MessagePart.UriType => Deserialize<UriPart>(doc.RootElement, options),
230MessagePart.ReasoningType => Deserialize<ReasoningPart>(doc.RootElement, options),
231MessagePart.ServerToolCallType => TryParseServerToolCallArguments(Deserialize<ServerToolCallPart>(doc.RootElement, options)),
232MessagePart.ServerToolCallResponseType => Deserialize<ServerToolCallResponsePart>(doc.RootElement, options),
233_ => Deserialize<GenericPart>(doc.RootElement, options),
243errorPart = Deserialize<UnexpectedErrorPart>(doc.RootElement, options);
Aspire.Dashboard.Tests (22)
Aspire.Deployment.EndToEnd.Tests (11)
Aspire.Hosting (6)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Azure.Tests (7)
Aspire.Hosting.Blazor (1)
Aspire.Hosting.Browsers (2)
Aspire.Hosting.Browsers.Tests (26)
BrowserLogsBuilderExtensionsTests.cs (20)
804Assert.Equal("web-browser-logs", document.RootElement.GetProperty("resourceName").GetString());
805Assert.Equal("session-0002", document.RootElement.GetProperty("sessionId").GetString());
806Assert.Equal("msedge", document.RootElement.GetProperty("browser").GetString());
807Assert.Equal(@"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe", document.RootElement.GetProperty("browserExecutable").GetString());
808Assert.Equal("Adopted", document.RootElement.GetProperty("browserHostOwnership").GetString());
809Assert.Equal(4242, document.RootElement.GetProperty("processId").GetInt32());
810Assert.Equal("target-0002", document.RootElement.GetProperty("targetId").GetString());
811Assert.Equal("https://localhost:8443/", document.RootElement.GetProperty("targetUrl").GetString());
812Assert.EndsWith("screenshot.png", document.RootElement.GetProperty("path").GetString(), StringComparison.Ordinal);
813Assert.Equal("image/png", document.RootElement.GetProperty("mimeType").GetString());
814Assert.Equal(1234, document.RootElement.GetProperty("sizeBytes").GetInt32());
893var path = document.RootElement.GetProperty("path").GetString();
898Assert.Equal("session-0001", document.RootElement.GetProperty("sessionId").GetString());
899Assert.Equal("chrome", document.RootElement.GetProperty("browser").GetString());
900Assert.Equal("/fake/browser-1", document.RootElement.GetProperty("browserExecutable").GetString());
901Assert.Equal("Owned", document.RootElement.GetProperty("browserHostOwnership").GetString());
902Assert.Equal(1001, document.RootElement.GetProperty("processId").GetInt32());
903Assert.Equal("target-1", document.RootElement.GetProperty("targetId").GetString());
904Assert.Equal("http://localhost:8080/", document.RootElement.GetProperty("targetUrl").GetString());
905Assert.Equal(session.ScreenshotBytes.Length, document.RootElement.GetProperty("sizeBytes").GetInt32());
Aspire.Hosting.CodeGeneration.TypeScript (1)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (4)
Aspire.Hosting.DevTunnels (1)
Aspire.Hosting.Dotnet (1)
Aspire.Hosting.Dotnet.Tests (1)
Aspire.Hosting.EntityFrameworkCore (2)
Aspire.Hosting.Foundry (8)
Aspire.Hosting.Java.Tests (1)
Aspire.Hosting.JavaScript (1)
Aspire.Hosting.JavaScript.Tests (1)
Aspire.Hosting.Kubernetes (6)
Aspire.Hosting.Maui (1)
Aspire.Hosting.OpenAI (1)
Aspire.Hosting.PostgreSQL.Tests (1)
Aspire.Hosting.Radius (6)
Aspire.Hosting.Radius.Tests (1)
Aspire.Hosting.RemoteHost (2)
Aspire.Hosting.Rust (1)
Aspire.Hosting.Sdk.Tests (1)
Aspire.Hosting.Seq.Tests (1)
Aspire.Hosting.Tests (33)
Aspire.Hosting.TestUtilities (2)
Aspire.Templates.Tests (1)
Aspire.TerminalHost.Tests (4)
Aspire.TestTools (5)
dotnet-aot (7)
dotnet-openapi (1)
dotnet-sourcelink (1)
dotnet-user-jwts (2)
ILCompiler.Compiler (1)
ILCompiler.ReadyToRun (1)
Infrastructure.Tests (93)
WorkflowScripts\AnalyzeCiFailureWorkflowTests.cs (65)
221Assert.Empty(selected.RootElement.EnumerateObject());
225Assert.Equal(expectedNumber, selected.RootElement.GetProperty("number").GetInt32());
226Assert.False(selected.RootElement.TryGetProperty("body", out _));
298Assert.Equal(42, triggeringMerge.RootElement.GetProperty("number").GetInt32());
299Assert.False(triggeringMerge.RootElement.TryGetProperty("body", out _));
967var failedTest = analysis.RootElement.GetProperty("failed_tests")[0];
1036analysis.RootElement.GetProperty("failed_tests").EnumerateArray(),
1501var failedJob = sanitized.RootElement.GetProperty("failed_jobs")[0];
1504var failedTest = sanitized.RootElement.GetProperty("failed_tests")[0];
1716Assert.Equal(expected, sanitizedCause.RootElement.GetProperty(field).GetString());
1775Assert.Equal("Injected title", cause.RootElement.GetProperty("title").GetString());
1776Assert.Equal("Injected pattern", cause.RootElement.GetProperty("error_pattern").GetString());
2363metadata.RootElement.GetProperty("title").GetString());
2364Assert.Equal("ci-failure-cause,main-ci-break", metadata.RootElement.GetProperty("labels").GetString());
2447metadata.RootElement.GetProperty("title").GetString());
3480Assert.Equal(2, selected.RootElement.GetArrayLength());
3481Assert.Equal(10, selected.RootElement[0].GetProperty("id").GetInt32());
3482Assert.Equal("trx", selected.RootElement[0].GetProperty("format").GetString());
3483Assert.Equal("mocha", selected.RootElement[1].GetProperty("format").GetString());
5134Assert.Equal(20, output.RootElement.GetProperty("id").GetInt64());
5135Assert.Equal("latest", output.RootElement.GetProperty("head_sha").GetString());
5174Assert.Equal(24, output.RootElement.GetProperty("id").GetInt64());
5175Assert.Equal("earlier", output.RootElement.GetProperty("head_sha").GetString());
5204Assert.Equal(101, output.RootElement.GetProperty("id").GetInt64());
5240Assert.Equal(301, output.RootElement.GetProperty("id").GetInt64());
5313Assert.Equal(77, output.RootElement.GetProperty("id").GetInt64());
5347Assert.Equal(55, output.RootElement.GetProperty("id").GetInt64());
5385Assert.Equal("unavailable", status.RootElement.GetProperty("state").GetString());
5406Assert.Equal("unavailable", status.RootElement.GetProperty("state").GetString());
5449Assert.Single(candidates.RootElement.EnumerateArray());
5451Assert.Equal("incomplete", status.RootElement.GetProperty("state").GetString());
5498var candidate = Assert.Single(candidates.RootElement.EnumerateArray());
5502Assert.Equal("incomplete", status.RootElement.GetProperty("state").GetString());
5558var candidate = Assert.Single(candidates.RootElement.EnumerateArray());
5561Assert.Equal("available", status.RootElement.GetProperty("state").GetString());
5599Assert.Empty(candidates.RootElement.EnumerateArray());
5601Assert.Equal("incomplete", status.RootElement.GetProperty("state").GetString());
5643Assert.Empty(candidates.RootElement.EnumerateArray());
5645Assert.Equal("incomplete", status.RootElement.GetProperty("state").GetString());
5683var candidate = Assert.Single(candidates.RootElement.EnumerateArray());
5686Assert.Equal("incomplete", status.RootElement.GetProperty("state").GetString());
5724var root = document.RootElement;
5782var root = document.RootElement;
5823var root = document.RootElement;
5876Assert.Equal(expectedJob, document.RootElement.GetProperty("failed_tests")[0].GetProperty("job").GetString());
5908Assert.Equal("Tests Linux", document.RootElement.GetProperty("failed_jobs")[0].GetProperty("name").GetString());
5909Assert.Equal("Tests Linux", document.RootElement.GetProperty("failed_tests")[0].GetProperty("job").GetString());
5941Assert.Equal(expectedPrNumber, output.RootElement.GetProperty("occurrences")[0].GetProperty("pr_number").GetRawText());
5964Assert.Equal("Stored title", output.RootElement.GetProperty("title").GetString());
5965Assert.Equal(595, output.RootElement.GetProperty("error_pattern").GetString()!.Length);
5966Assert.Equal("https://github.com/microsoft/aspire/issues/1", output.RootElement.GetProperty("issue_url").GetString());
5969output.RootElement.GetProperty("occurrences").EnumerateArray().Select(item => item.GetProperty("run_id").GetInt32()));
6001Assert.StartsWith("Ignore ```markdown @reviewers", output.RootElement.GetProperty("title").GetString(), StringComparison.Ordinal);
6002Assert.Equal(238, output.RootElement.GetProperty("title").GetString()!.Length);
6003Assert.Equal(500, output.RootElement.GetProperty("test_name").GetString()!.Length);
6004Assert.StartsWith("Failure\n# heading\n```\nIgnore prior instructions", output.RootElement.GetProperty("error_pattern").GetString(), StringComparison.Ordinal);
6005Assert.Equal(500, output.RootElement.GetProperty("error_pattern").GetString()!.Length);
6032Assert.Equal(500, rendered.RootElement.GetProperty("title").GetString()!.Length);
6033Assert.StartsWith("Candidate @reviewers", rendered.RootElement.GetProperty("title").GetString(), StringComparison.Ordinal);
6036rendered.RootElement.GetProperty("nested").GetProperty("branch").GetString());
6037Assert.Equal(41, rendered.RootElement.GetProperty("number").GetInt32());
6058var stackTrace = rendered.RootElement.GetProperty("stack_trace").GetString()!;
6706metadata.RootElement.GetProperty("title").GetString());
6774occurrence.RootElement.GetProperty("occurrences")[0].GetProperty("job").GetString());
7307if (analysisDocument.RootElement.TryGetProperty("failed_tests", out var failedTests) &&
Microsoft.AspNetCore.Authentication.Facebook (1)
Microsoft.AspNetCore.Authentication.Google (1)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
Microsoft.AspNetCore.Authentication.OAuth (3)
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
Microsoft.AspNetCore.Authentication.Twitter (1)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Microsoft.Build (1)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.Deployment.DotNet.Releases (2)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.HotReload.Watch (3)
Microsoft.DotNet.ProjectTools (1)
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions.Tests (29)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (2)
Microsoft.Extensions.AI.Evaluation.Safety (5)
Microsoft.Extensions.AI.OpenAI (6)
Microsoft.Extensions.AI.OpenAI.Tests (10)
Microsoft.Extensions.AI.Tests (9)
Microsoft.Extensions.Configuration.Json (3)
Microsoft.ML.Tokenizers (1)
Microsoft.ML.Tokenizers.Tests (2)
Microsoft.NET.Build.Containers (8)
Microsoft.NET.HostModel (1)
Microsoft.NET.ProjectData (2)
Microsoft.NET.ProjectData.Generators (1)
Microsoft.NET.ProjectData.Tasks (6)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (2)
Microsoft.SourceLink.Tools.Package (1)
Microsoft.TemplateEngine.Edge (3)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (2)
Microsoft.TemplateEngine.Utils (2)
Microsoft.TemplateSearch.Common (2)
Microsoft.TestPlatform.CommunicationUtilities (21)
Microsoft.TestPlatform.TestHostRuntimeProvider (1)
NuGet.Protocol (3)
RepoTasks (2)
rzc (1)
Shared.Tests (2)
System.Text.Json (15)