743 references to Parse
AnalyzeCiFailure (5)
AnalyzeCiFailure.TestHost (3)
AnalyzeCiFailure.Tests (228)
AnalyzeCiFailureCollectionTests.cs (35)
24var evidence = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "evidence.json")))!;
43var evidence = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "evidence.json")))!;
59Assert.Equal("The hosted runner lost communication with the server.", JsonNode.Parse(json)!["jobs"]![0]!["runner_failure"]!.GetValue<string>());
77var outcome = JsonNode.Parse(await File.ReadAllTextAsync(
114var summary = JsonNode.Parse(await File.ReadAllTextAsync(
182var evidence = JsonNode.Parse(await File.ReadAllTextAsync(
207var summary = JsonNode.Parse(await File.ReadAllTextAsync(
359var job = Assert.Single(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/failed-jobs.json")))!.AsArray())!;
369Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "collection-outcome.json")))!["has_work"]!.GetValue<bool>());
370var state = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!;
374var annotations = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/annotations-77.json")))!.AsArray();
397Assert.False(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "collection-outcome.json")))!["has_work"]!.GetValue<bool>());
406var jobs = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "diagnostics/failed-jobs.json")))!.AsArray();
409Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "collection-outcome.json")))!["has_work"]!.GetValue<bool>());
420var job = Assert.Single(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/failed-jobs.json")))!.AsArray())!;
423Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "collection-outcome.json")))!["has_work"]!.GetValue<bool>());
424Assert.Equal("not-applicable", JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!["state"]!.GetValue<string>());
425Assert.Empty(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!["failures"]!.AsArray());
436var job = Assert.Single(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/failed-jobs.json")))!.AsArray())!;
439Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "collection-outcome.json")))!["has_work"]!.GetValue<bool>());
440Assert.Equal("not-applicable", JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!["state"]!.GetValue<string>());
441Assert.Empty(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!["failures"]!.AsArray());
452var bundle = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!;
462var jobs = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/failed-jobs.json")))!.AsArray();
469Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "collection-outcome.json")))!["has_work"]!.GetValue<bool>());
486Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "collection-outcome.json")))!["has_work"]!.GetValue<bool>());
510var state = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!;
526var state = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!;
573var bundle = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!;
614var bundle = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "evidence.json")))!;
631var index = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "history/cause-index.json")))!.AsArray();
682var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "jobs.json")))!;
702var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "jobs.json")))!;
744var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "jobs.json")))!.AsArray();
839var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "jobs.json")))!;
AnalyzeCiFailureMigrationTests.cs (11)
112var index = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(root, "history/cause-index.json")))!.AsArray();
129var regeneratedIndex = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(root, "history/cause-index.json")))!.AsArray();
249Assert.Equal(1000, JsonNode.Parse(annotation)![0]!["message"]!.GetValue<string>().Length);
329["number"] = JsonNode.Parse(id),
339var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
354["number"] = JsonNode.Parse(id),
427var before = JsonNode.Parse(durable.Output)!;
440var stored = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
451var summary = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "runs", "123.json")))!;
572var stored = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(memory, "causes", "transferred-timeout.json")))!;
685var outcome = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(root, "collection-outcome.json")))!;
AnalyzeCiFailurePreparationTests.cs (31)
28var artifacts = JsonNode.Parse(await File.ReadAllTextAsync(paths.SelectedTestArtifacts))!;
48? JsonNode.Parse(await File.ReadAllTextAsync(paths.PriorCauseIndex))![0]!["read_error"]!.GetValue<string>()
88var document = JsonNode.Parse(AnalyzeCiFailure.TransientJson.Write(evidence))!;
112var selected = JsonNode.Parse(await File.ReadAllTextAsync(paths.SelectedTestArtifacts))!.AsArray();
164Assert.Equal("unavailable", JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(paths.RootDirectory, "test-evidence.json")))!["state"]!.GetValue<string>());
177var document = JsonNode.Parse(AnalyzeCiFailure.TransientJson.Write(evidence))!;
180document["jobs"] = JsonNode.Parse(json);
184document["test_evidence"]!["failures"]![0]!["sources"] = JsonNode.Parse(json);
208var index = JsonNode.Parse(await File.ReadAllTextAsync(paths.PriorCauseIndex))!.AsArray();
233new AnalyzeCiFailure.WorkflowArtifact(JsonNode.Parse(artifact.Id!.Value.GetRawText()), artifact.Name, SizeInBytes: null, Expired: false, CreatedAt: null),
336var index = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "history/cause-index.json")))!.AsArray();
342var original = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, item["file"]!.GetValue<string>())))!;
367var entry = Assert.Single(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "history/cause-index.json")))!.AsArray())!;
414var index = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "history/cause-index.json")))!.AsArray();
464var failures = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "test-failures.json")))!;
508Assert.Equal("unavailable", JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "test-evidence.json")))!["state"]!.GetValue<string>());
529var failures = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "test-failures.json")))!.AsArray();
555var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
558var summary = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "runs", "123.json")))!;
607var document = JsonNode.Parse(AnalyzeCiFailure.TransientJson.Write(proposal))!;
688var jobs = JsonNode.Parse(await File.ReadAllTextAsync(jobsPath))!.AsArray();
693var collected = JsonNode.Parse(await File.ReadAllTextAsync(trustedPath))!.AsArray();
698var analysis = JsonNode.Parse(await File.ReadAllTextAsync(analysisPath))!;
748var failures = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "test-failures.json")))!.AsArray();
775Assert.Equal("unavailable", JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "test-evidence.json")))!["state"]!.GetValue<string>());
799var failures = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "test-failures.json")))!.AsArray();
802var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
815var cause = JsonNode.Parse(await File.ReadAllTextAsync(causePath))!;
841var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
852var cause = JsonNode.Parse(await File.ReadAllTextAsync(causePath))!;
867var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
AnalyzeCiFailurePublicationTests.cs (58)
120var analysis = JsonNode.Parse(await File.ReadAllTextAsync(path))!;
142var other = JsonNode.Parse(CreateCause("other-failure", "flaky-test", jobId: 456))!;
224? JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "ci-analysis-output", "causes", "debugger-timeout.json")))!.AsObject()
278var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
307var request = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "published-comment-request.json")))!;
366Assert.Equal("https://github.com/microsoft/aspire/issues/77", JsonNode.Parse(remote.Output)!["issue_url"]!.GetValue<string>());
391var history = storedLink ? JsonNode.Parse("""
421var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
429var cause = JsonNode.Parse(await File.ReadAllTextAsync(causePath))!;
506var collected = JsonNode.Parse(await File.ReadAllTextAsync(trustedPath))!;
512var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
518var cause = JsonNode.Parse(await File.ReadAllTextAsync(causePath))!;
536var collected = JsonNode.Parse(await File.ReadAllTextAsync(path))!;
541var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
545var cause = JsonNode.Parse(await File.ReadAllTextAsync(causePath))!;
565var collected = JsonNode.Parse(await File.ReadAllTextAsync(dataPath))!;
569var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
573var cause = JsonNode.Parse(await File.ReadAllTextAsync(causePath))!;
581var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
640history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!.AsObject();
673Assert.Equal("https://github.com/microsoft/aspire/issues/77", JsonNode.Parse(remote.Output)!["issue_url"]!.GetValue<string>());
674var original = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue.json")))!;
688var collected = JsonNode.Parse(await File.ReadAllTextAsync(data))!;
696var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
703var cause = JsonNode.Parse(await File.ReadAllTextAsync(causePath))!;
738var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
739var cause = JsonNode.Parse(await File.ReadAllTextAsync(causePath))!;
740var collected = JsonNode.Parse(await File.ReadAllTextAsync(trustedPath))!;
784var run = JsonNode.Parse(await File.ReadAllTextAsync(file))!;
827var original = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue.json")))!;
874var history = JsonNode.Parse(remote.Output)!;
1095var cause = JsonNode.Parse(await File.ReadAllTextAsync(
1101var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
1120var local = JsonNode.Parse(await File.ReadAllTextAsync(path))!;
1129var stored = JsonNode.Parse(durable.Output)!;
1175var document = JsonNode.Parse(AnalyzeCiFailure.TransientJson.Write(proposal))!;
1208var cause = JsonNode.Parse(await File.ReadAllTextAsync(path))!;
1218var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
1225var evidence = JsonNode.Parse(await File.ReadAllTextAsync(evidencePath))!;
1241var other = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(directory, "causes", "debugger-timeout.json")))!;
1245var summary = JsonNode.Parse(await File.ReadAllTextAsync(path))!;
1260var summary = JsonNode.Parse(await File.ReadAllTextAsync(path))!;
1269var evidence = JsonNode.Parse(await File.ReadAllTextAsync(evidencePath))!;
1280var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
1282var run = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "runs", "123.json")))!;
1294var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
1300var cause = JsonNode.Parse(await File.ReadAllTextAsync(path))!;
1308var evidence = JsonNode.Parse(await File.ReadAllTextAsync(evidencePath))!;
1336var definition = JsonNode.Parse("""{"id":"timeout","type":"flaky-test","title":"New title"}""")!.AsObject();
1337var existing = JsonNode.Parse(
1339var occurrence = JsonNode.Parse(
1355var summary = JsonNode.Parse(await File.ReadAllTextAsync(summaryPath))!;
1359var cause = JsonNode.Parse(await File.ReadAllTextAsync(causePath))!;
1363var evidence = JsonNode.Parse(await File.ReadAllTextAsync(evidencePath))!;
1450var stored = JsonNode.Parse(await File.ReadAllTextAsync(storedPath))!;
1455Assert.True(JsonNode.DeepEquals(stored, JsonNode.Parse(durable.Output)));
1478stored = JsonNode.Parse(await File.ReadAllTextAsync(storedPath))!;
1485Assert.Equal("https://github.com/microsoft/aspire/issues/77", JsonNode.Parse(durable.Output)!["issue_url"]!.GetValue<string>());
aspire (28)
Aspire.Cli.EndToEnd.Tests (43)
Aspire.Cli.Tests (205)
Configuration\ConfigSourceServiceTests.cs (25)
55return Task.FromResult(("version-1", JsonNode.Parse("""
129ReadConfiguration = (_, _) => Task.FromResult(("version-1", JsonNode.Parse("""
179ReadConfiguration = (_, _) => Task.FromResult(("version-1", JsonNode.Parse(json)!.AsObject()))
344var configuration = JsonNode.Parse(await File.ReadAllTextAsync(path))!;
678var configuration = JsonNode.Parse(await File.ReadAllTextAsync(path), documentOptions: ConfigurationHelper.ParseOptions)!;
1297ReadConfiguration = (_, _) => Task.FromResult(("version-1", JsonNode.Parse("""
1321ReadConfiguration = (_, _) => Task.FromResult(("version-1", JsonNode.Parse("""
1342ReadConfiguration = (_, _) => Task.FromResult(("version-1", JsonNode.Parse("""
1364ReadConfiguration = (_, _) => Task.FromResult(("version-2", JsonNode.Parse("""
1376var settings = JsonNode.Parse(await File.ReadAllTextAsync(path))!.AsObject();
1392ReadConfiguration = (_, _) => Task.FromResult(("version-2", JsonNode.Parse("""
1411var configuration = JsonNode.Parse(await File.ReadAllTextAsync(path))!.AsObject();
1412configuration["skillSources"] = JsonNode.Parse("""
1415configuration["profiles"] = JsonNode.Parse("""
1422ReadConfiguration = (_, _) => Task.FromResult(("version-2", JsonNode.Parse(flattenedSource
1448var configuration = JsonNode.Parse(await File.ReadAllTextAsync(path))!.AsObject();
1449configuration["skillSources"] = JsonNode.Parse("""{"team":{"repository":"example/local","custom:setting":"local"}}""");
1453ReadConfiguration = (_, _) => Task.FromResult(("version-2", JsonNode.Parse("""
1470var configuration = JsonNode.Parse(await File.ReadAllTextAsync(path))!.AsObject();
1471configuration["SKILLSOURCES"] = JsonNode.Parse("""
1474configuration["skillSources"] = JsonNode.Parse("""
1480ReadConfiguration = (_, _) => Task.FromResult(("version-2", JsonNode.Parse("""
1581var tracking = JsonNode.Parse(await File.ReadAllTextAsync(checkPath))!.AsObject();
1888var configuration = JsonNode.Parse(await File.ReadAllTextAsync(path))!;
2073ReadConfiguration = (_, _) => Task.FromResult(("version-1", JsonNode.Parse("""
Aspire.Dashboard (4)
Aspire.Dashboard.Components.Tests (2)
Aspire.Dashboard.Tests (18)
Aspire.Hosting (8)
Aspire.Hosting.Azure (6)
Aspire.Hosting.Azure.EventHubs (1)
Aspire.Hosting.Azure.Kubernetes (1)
Aspire.Hosting.Azure.ServiceBus (1)
Aspire.Hosting.Azure.Tests (9)
Aspire.Hosting.CodeGeneration.Go.Tests (8)
Aspire.Hosting.CodeGeneration.Java.Tests (3)
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (2)
Aspire.Hosting.Foundry.Tests (2)
Aspire.Hosting.Kubernetes (3)
Aspire.Hosting.Native.Client (2)
Aspire.Hosting.Native.Core.Tests (27)
Aspire.Hosting.Native.Server (3)
Aspire.Hosting.Radius (1)
Aspire.Hosting.Redis.Tests (1)
Aspire.Hosting.RemoteHost (2)
Aspire.Hosting.RemoteHost.Tests (13)
Aspire.Hosting.Tests (14)
ConfigurationSchemaGenerator.Tests (2)
dotnet-aot (2)
GenerateTemplateManifest (1)
Infrastructure.Tests (27)
Microsoft.Extensions.AI.Abstractions.Tests (2)
Microsoft.Extensions.AI.Evaluation.Quality (2)
Microsoft.Extensions.AI.Evaluation.Safety (1)
Microsoft.Extensions.AI.Integration.Tests (2)
Microsoft.Extensions.AI.Tests (1)
Microsoft.ML.AutoML (4)
Microsoft.ML.AutoML.SourceGenerator (1)
Microsoft.NET.Build.Containers (3)
Microsoft.NET.Build.Tasks (1)
Microsoft.TemplateEngine.Cli (6)
Microsoft.TemplateEngine.Edge (9)
parent\Shared\JExtensions.cs (8)
444return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
453return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
582return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
591return JsonNode.Parse(json, null, DocOptions);
605return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
614return (JsonObject?)JsonNode.Parse(source.ToJsonString(), null, DocOptions)
643targetArr.Add(item != null ? JsonNode.Parse(item.ToJsonString()) : null);
650? JsonNode.Parse(property.Value.ToJsonString())
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (8)
parent\Shared\JExtensions.cs (8)
444return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
453return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
582return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
591return JsonNode.Parse(json, null, DocOptions);
605return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
614return (JsonObject?)JsonNode.Parse(source.ToJsonString(), null, DocOptions)
643targetArr.Add(item != null ? JsonNode.Parse(item.ToJsonString()) : null);
650? JsonNode.Parse(property.Value.ToJsonString())
Microsoft.TemplateEngine.Utils (8)
parent\Shared\JExtensions.cs (8)
444return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
453return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
582return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
591return JsonNode.Parse(json, null, DocOptions);
605return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
614return (JsonObject?)JsonNode.Parse(source.ToJsonString(), null, DocOptions)
643targetArr.Add(item != null ? JsonNode.Parse(item.ToJsonString()) : null);
650? JsonNode.Parse(property.Value.ToJsonString())
Microsoft.TemplateSearch.Common (8)
parent\Shared\JExtensions.cs (8)
444return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
453return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
582return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
591return JsonNode.Parse(json, null, DocOptions);
605return (JsonObject?)JsonNode.Parse(json, null, DocOptions)
614return (JsonObject?)JsonNode.Parse(source.ToJsonString(), null, DocOptions)
643targetArr.Add(item != null ? JsonNode.Parse(item.ToJsonString()) : null);
650? JsonNode.Parse(property.Value.ToJsonString())
NativeIntegrations.DockerCompose (5)
sdk-tasks (4)
Shared.Tests (2)