235 references to GetProperty
Aspire.Hosting.PostgreSQL.Tests (33)
AddPostgresTests.cs (33)
473var servers = document.RootElement.GetProperty("Servers");
476Assert.Equal(pg1.Resource.Name, servers.GetProperty("1").GetProperty("Name").GetString());
477Assert.Equal("Servers", servers.GetProperty("1").GetProperty("Group").GetString());
478Assert.Equal("mypostgres1", servers.GetProperty("1").GetProperty("Host").GetString());
479Assert.Equal(5432, servers.GetProperty("1").GetProperty("Port").GetInt32());
480Assert.Equal("postgres", servers.GetProperty("1").GetProperty("Username").GetString());
481Assert.Equal("prefer", servers.GetProperty("1").GetProperty("SSLMode").GetString());
482Assert.Equal("postgres", servers.GetProperty("1").GetProperty("MaintenanceDB").GetString());
483Assert.Equal($"echo '{pg1.Resource.PasswordParameter.Value}'", servers.GetProperty("1").GetProperty("PasswordExecCommand").GetString());
486Assert.Equal(pg2.Resource.Name, servers.GetProperty("2").GetProperty("Name").GetString());
487Assert.Equal("Servers", servers.GetProperty("2").GetProperty("Group").GetString());
488Assert.Equal("mypostgres2", servers.GetProperty("2").GetProperty("Host").GetString());
489Assert.Equal(5432, servers.GetProperty("2").GetProperty("Port").GetInt32());
490Assert.Equal("myuser", servers.GetProperty("2").GetProperty("Username").GetString());
491Assert.Equal("prefer", servers.GetProperty("2").GetProperty("SSLMode").GetString());
492Assert.Equal("postgres", servers.GetProperty("2").GetProperty("MaintenanceDB").GetString());
493Assert.Equal($"echo '{pg2.Resource.PasswordParameter.Value}'", servers.GetProperty("2").GetProperty("PasswordExecCommand").GetString());
Diagnostics.FunctionalTests (11)
dotnet-openapi (1)
JwtBearerSample (1)
Microsoft.AspNetCore.Authentication.Test (8)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (54)
ServerStreamingServerCallHandlerTests.cs (10)
68Assert.Equal("Hello TestName! 1", responseJson1.RootElement.GetProperty("message").GetString());
75Assert.Equal("Hello TestName! 2", responseJson2.RootElement.GetProperty("message").GetString());
112Assert.Equal("Hello TestName! 1", responseJson1.RootElement.GetProperty("message").GetString());
116Assert.Equal("Exception was thrown by handler.", responseJson2.RootElement.GetProperty("message").GetString());
117Assert.Equal(2, responseJson2.RootElement.GetProperty("code").GetInt32());
154Assert.Equal("Hello TestName! 1", responseJson1.RootElement.GetProperty("message").GetString());
158Assert.Equal("Detail!", responseJson2.RootElement.GetProperty("message").GetString());
159Assert.Equal((int)StatusCode.Aborted, responseJson2.RootElement.GetProperty("code").GetInt32());
195Assert.Equal("Exception was thrown by handler. Exception: Exception!", responseJson.RootElement.GetProperty("message").GetString());
196Assert.Equal(2, responseJson.RootElement.GetProperty("code").GetInt32());
UnaryServerCallHandlerTests.cs (44)
82Assert.Equal("Hello TestName!", responseJson.RootElement.GetProperty("message").GetString());
717Assert.Equal("", responseJson.RootElement.GetProperty("message").GetString());
749Assert.Equal(expectedError, responseJson.RootElement.GetProperty("message").GetString());
750Assert.Equal((int)StatusCode.InvalidArgument, responseJson.RootElement.GetProperty("code").GetInt32());
787Assert.Equal(expectedError, responseJson.RootElement.GetProperty("message").GetString());
788Assert.Equal((int)StatusCode.InvalidArgument, responseJson.RootElement.GetProperty("code").GetInt32());
817Assert.Equal(expectedError, responseJson.RootElement.GetProperty("message").GetString());
818Assert.Equal((int)StatusCode.InvalidArgument, responseJson.RootElement.GetProperty("code").GetInt32());
841Assert.Equal("Detail!", responseJson.RootElement.GetProperty("message").GetString());
842Assert.Equal((int)StatusCode.Unauthenticated, responseJson.RootElement.GetProperty("code").GetInt32());
866Assert.Equal("Detail!", responseJson.RootElement.GetProperty("message").GetString());
867Assert.Equal((int)StatusCode.Unauthenticated, responseJson.RootElement.GetProperty("code").GetInt32());
933Assert.Equal(123, responseJson.RootElement.GetProperty("code").GetInt32());
934Assert.Equal("This is a message", responseJson.RootElement.GetProperty("message").GetString());
936var details = responseJson.RootElement.GetProperty("details").EnumerateArray().ToArray();
940Assert.Equal("type.googleapis.com/google.rpc.DebugInfo", d.GetProperty("@type").GetString());
941Assert.Equal("This is some debugging information", d.GetProperty("detail").GetString());
945Assert.Equal("type.googleapis.com/google.rpc.RequestInfo", d.GetProperty("@type").GetString());
946Assert.Equal("request-id", d.GetProperty("requestId").GetString());
950Assert.Equal("type.googleapis.com/google.rpc.BadRequest", d.GetProperty("@type").GetString());
951Assert.Equal(1, d.GetProperty("fieldViolations").GetArrayLength());
1011Assert.Equal(123, responseJson.RootElement.GetProperty("code").GetInt32());
1012Assert.Equal("This is a message", responseJson.RootElement.GetProperty("message").GetString());
1014var details = responseJson.RootElement.GetProperty("details").EnumerateArray().ToArray();
1018Assert.Equal("type.googleapis.com/google.rpc.DebugInfo", d.GetProperty("@type").GetString());
1019Assert.Equal("This is some debugging information", d.GetProperty("detail").GetString());
1023Assert.Equal("type.googleapis.com/google.rpc.RequestInfo", d.GetProperty("@type").GetString());
1024Assert.Equal("request-id", d.GetProperty("requestId").GetString());
1028Assert.Equal("type.googleapis.com/google.rpc.BadRequest", d.GetProperty("@type").GetString());
1029Assert.Equal(1, d.GetProperty("fieldViolations").GetArrayLength());
1053Assert.Equal("Exception was thrown by handler.", responseJson.RootElement.GetProperty("message").GetString());
1054Assert.Equal((int)StatusCode.Unknown, responseJson.RootElement.GetProperty("code").GetInt32());
1083Assert.Equal("Exception was thrown by handler. InvalidOperationException: Error!", responseJson.RootElement.GetProperty("message").GetString());
1084Assert.Equal((int)StatusCode.Unknown, responseJson.RootElement.GetProperty("code").GetInt32());
1112Assert.Equal(@"Detail!", responseJson.RootElement.GetProperty("message").GetString());
1113Assert.Equal((int)StatusCode.Unauthenticated, responseJson.RootElement.GetProperty("code").GetInt32());
1155Assert.Equal(@"Hello World!", responseJson.RootElement.GetProperty("message").GetString());
1209Assert.Equal($"Hello {requestContent.Length}!", responseJson.RootElement.GetProperty("message").GetString());
1236Assert.Equal("Unable to deserialize null to Int32Value.", responseJson.RootElement.GetProperty("message").GetString());
1475Assert.Equal("Exception was thrown by handler.", responseJson.RootElement.GetProperty("message").GetString());
1476Assert.Equal((int)StatusCode.Unknown, responseJson.RootElement.GetProperty("code").GetInt32());
1737var anyMessage = responseJson.RootElement.GetProperty("anyMessage");
1738Assert.Equal("type.googleapis.com/google.protobuf.StringValue", anyMessage.GetProperty("@type").GetString());
1739Assert.Equal("A value!", anyMessage.GetProperty("value").GetString());
Microsoft.AspNetCore.Http.Abstractions.Tests (10)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
Microsoft.AspNetCore.Identity.FunctionalTests (74)
MapIdentityApiTests.cs (74)
116var tokenType = loginContent.GetProperty("tokenType").GetString();
117var accessToken = loginContent.GetProperty("accessToken").GetString();
118var expiresIn = loginContent.GetProperty("expiresIn").GetDouble();
148var tokenType = loginContent.GetProperty("token_type").GetString();
149var accessToken = loginContent.GetProperty("access_token").GetString();
150var expiresIn = loginContent.GetProperty("expires_in").GetDouble();
183var accessToken = loginContent.GetProperty("accessToken").GetString();
184var expiresIn = loginContent.GetProperty("expiresIn").GetDouble();
262var accessToken = loginContent.GetProperty("accessToken").GetString();
297var refreshToken = loginContent.GetProperty("refreshToken").GetString();
301var accessToken = refreshContent.GetProperty("accessToken").GetString();
343var refreshToken = loginContent.GetProperty("refreshToken").GetString();
344var accessToken = loginContent.GetProperty("refreshToken").GetString();
367refreshToken = refreshContent.GetProperty("refreshToken").GetString();
371accessToken = refreshContent.GetProperty("accessToken").GetString();
416var accessToken = refreshContent.GetProperty("accessToken").GetString();
673var accessToken = loginContent.GetProperty("accessToken").GetString();
674var refreshToken = loginContent.GetProperty("refreshToken").GetString();
692Assert.False(twoFactorKeyContent.GetProperty("isTwoFactorEnabled").GetBoolean());
693Assert.False(twoFactorKeyContent.GetProperty("isMachineRemembered").GetBoolean());
695var sharedKey = twoFactorKeyContent.GetProperty("sharedKey").GetString();
704Assert.True(enable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
705Assert.False(enable2faContent.GetProperty("isMachineRemembered").GetBoolean());
731var accessToken = loginContent.GetProperty("accessToken").GetString();
736var sharedKey = twoFactorKeyContent.GetProperty("sharedKey").GetString();
745Assert.True(enable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
747var recoveryCodes = enable2faContent.GetProperty("recoveryCodes").EnumerateArray().Select(e => e.GetString()).ToArray();
758var recoveryAccessToken = recoveryLoginContent.GetProperty("accessToken").GetString();
765Assert.False(disable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
783var accessToken = loginContent.GetProperty("accessToken").GetString();
788var sharedKey = twoFactorKeyContent.GetProperty("sharedKey").GetString();
800Assert.True(enable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
804Assert.False(resetKeyContent.GetProperty("isTwoFactorEnabled").GetBoolean());
806var resetSharedKey = resetKeyContent.GetProperty("sharedKey").GetString();
817Assert.True(enable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
830var accessToken = loginContent.GetProperty("accessToken").GetString();
835var sharedKey = twoFactorKeyContent.GetProperty("sharedKey").GetString();
844var recoveryCodes = enable2faContent.GetProperty("recoveryCodes").EnumerateArray().Select(e => e.GetString()).ToArray();
845Assert.Equal(10, enable2faContent.GetProperty("recoveryCodesLeft").GetInt32());
860var recoveryAccessToken = recoveryLoginContent.GetProperty("accessToken").GetString();
867Assert.Equal(8, updated2faContent.GetProperty("recoveryCodesLeft").GetInt32());
868Assert.Null(updated2faContent.GetProperty("recoveryCodes").GetString());
875var resetRecoveryCodes = resetRecoveryContent.GetProperty("recoveryCodes").EnumerateArray().Select(e => e.GetString()).ToArray();
876Assert.Equal(10, resetRecoveryContent.GetProperty("recoveryCodesLeft").GetInt32());
901Assert.False(twoFactorKeyContent.GetProperty("isTwoFactorEnabled").GetBoolean());
902Assert.False(twoFactorKeyContent.GetProperty("isMachineRemembered").GetBoolean());
904var sharedKey = twoFactorKeyContent.GetProperty("sharedKey").GetString();
913Assert.True(enable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
914Assert.False(enable2faContent.GetProperty("isMachineRemembered").GetBoolean());
925Assert.True(session2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
926Assert.False(session2faContent.GetProperty("isMachineRemembered").GetBoolean());
934Assert.True(session2faContent2.GetProperty("isTwoFactorEnabled").GetBoolean());
935Assert.False(session2faContent2.GetProperty("isMachineRemembered").GetBoolean());
943Assert.True(persistent2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
944Assert.True(persistent2faContent.GetProperty("isMachineRemembered").GetBoolean());
1040Assert.Equal(Email, infoResponse.GetProperty("email").GetString());
1041Assert.True(infoResponse.GetProperty("isEmailConfirmed").GetBoolean());
1058Assert.Equal(Email, infoPostContent.GetProperty("email").GetString());
1059Assert.True(infoPostContent.GetProperty("isEmailConfirmed").GetBoolean());
1085Assert.Equal(newEmail, infoAfterEmailChange.GetProperty("email").GetString());
1100Assert.Equal(newEmail, infoAfterFinalLogin.GetProperty("email").GetString());
1101Assert.True(infoAfterFinalLogin.GetProperty("isEmailConfirmed").GetBoolean());
1136Assert.Equal(Email, infoResponse.GetProperty("email").GetString());
1152Assert.Equal(Email, infoPostContent.GetProperty("email").GetString());
1174Assert.Equal(newEmail, infoAfterEmailChange.GetProperty("email").GetString());
1186Assert.Equal(newEmail, infoAfterFinalLogin.GetProperty("email").GetString());
1251Assert.Equal(Email, infoPostContent.GetProperty("email").GetString());
1252Assert.False(infoPostContent.GetProperty("isEmailConfirmed").GetBoolean());
1270Assert.Equal(newEmail, infoGetContent.GetProperty("email").GetString());
1271Assert.True(infoGetContent.GetProperty("isEmailConfirmed").GetBoolean());
1356=> claims.EnumerateArray().Single(e => e.GetProperty("type").GetString() == name).GetProperty("value").GetString();
1396var accessToken = loginContent.GetProperty("accessToken").GetString();
1397var refreshToken = loginContent.GetProperty("refreshToken").GetString();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (8)
Microsoft.Build (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
Negotiate.Client (4)
Templates.Blazor.Tests (3)
Templates.Blazor.WebAssembly.Auth.Tests (3)
Templates.Blazor.WebAssembly.Tests (3)
Templates.Mvc.Tests (3)
Templates.Tests (3)